> ...so how do you actually do this then?
Save the text below as "demoScript.vbs" and double-click it. It will write
a list of all files in your C: drive to a text file called "FileList.txt".
Obviously way more complex stuff can be done (like recursing subdirectories
if you want). Google "VBscript tutorial".
Set fso = CreateObject("Scripting.FileSystemObject")
sFolder = "C:\"
Set NewFile = fso.CreateTextFile(sFolder&"\FileList.txt", True)
Set folder = fso.GetFolder(sFolder)
Set files = folder.Files
For each folderIdx In files
NewFile.WriteLine(folderIdx.Name)
Next
NewFile.Close
Wscript.Echo "Done!"
Post a reply to this message
|