Yeah...you were going about it the hard way
Code:
const ForAppending = 8
textFilePath = "C:test.txt"
set objFSO = createobject("Scripting.FileSystemObject")
set objTextFile = objFSO.opentextfile(textFilePath,ForAppending)
strFolder = "C:ringtones"
set objFSO = createobject("Scripting.FileSystemObject")
GetFiles strFolder
sub GetFiles(byval strDirectory)
set objFolder = objFSO.GetFolder(strDirectory)
for each objFile in objFolder.Files
objTextFile.WriteLine objFile.Path
next
for each objFolder in objFolder.SubFolders
GetFiles objFolder.Path
next
end sub
objTextFile.Close Things you could add - check that the text file to be written to exists, create if not. Error checking, file attributes, pass in text file or target folder as arguments..that sorta thing.
Unless you want to go about this in a totally tarded method of sending things to a printer?