Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Showing Directories,subdirectories and files

Status
Not open for further replies.

VisualBasicHelp

Programmer
Sep 7, 2005
74
GB
I am trying to get all the subdirectories and files inside a folder into a file. I needed the same output as I get while I do in DOS with the command - "dir /s", the same output I needed to get it from VB.

Can anybody help me to get this.

Thanks
Disha
 
Did you try using the Scripting.FileSystemObject ?
 
or you could just Shell your DOS command and redirect output to a file:
Shell "dir /s > MyFoo.txt
 
Also you might prefer to use the Exec method of WScript.Shell
 
I would like to prefer using Scripting.FileSystemObject, can you please tell me, how to do with it.
 
You're most welcome. If anyone has advice on how to find threads that you were JUST READING (blast it all, took me a half hour to find that one), please share.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top