Adding filenames in folder to txt file

Directlinq

Registered User.
Local time
Yesterday, 22:54
Joined
Sep 13, 2009
Messages
67
Could somebody please help me copy the filenames of an entire folder into a text file with each filename being on a seperate line.

Many Thanks
 
I would...
1) Get a Scripting.FileSystemObject and run the .GetFolder() method. This returns a Folder object that contains a Files collection.
2) Using this same FileSystemObject, run its OpenTextFile() method, which returns a TextStream object you can write to.
3) Iterate thru the Files collection in 1) and WriteLine each filename to the TextSteam in 2)
Hope that helps,
Cheers,
 

Users who are viewing this thread

Back
Top Bottom