Discussion Locked

File Listing Script

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I am new to VB and am using VB 6 to get a list of files in folders and subfolders of a specified drive. Anyone have a script to do this that I can use? Any help would be appreciated!!!!

2 replies

by jakl

First select Microsoft Scripting Runtime item from Project/References

//Example code

Dim FSys As New Scripting.FileSystemObject

Set ThisFolder = FSys.GetFolder(folderName)
Set AllFiles = ThisFolder.Files

For Each file in AllFiles
{put you code logic here}
Next

by jakl

First select Microsoft Scripting Runtime item from Project/References

//Example code

Dim FSys As New Scripting.FileSystemObject

Set ThisFolder = FSys.GetFolder(folderName)
Set AllFiles = ThisFolder.Files

For Each file in AllFiles
{put you code logic here}
Next

This discussion is closed to new replies.