Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: Tontow on April 26, 2004, 12:25 PM

Title: How would you convert a directory and all of its contents to text file
Post by: Tontow on April 26, 2004, 12:25 PM
How would you convert a directory and all of its contents to  a text file?

IE: I have a very larg folder that contains 3000++ files (files in the subfolders included), and i need to list each of those files including all of the files that are it the sub folders and all the files that are in the sub-sub folders etc.

basically if i where to put the exe drive c (C:\) it would list every file right down to your desktop, game folders, everything.

if i where to put it on my desktop it would list everything on my desktop.


if im not being clear then please say so.
Title: Re:How would you convert a directory and all of its contents to text file
Post by: Adron on April 26, 2004, 12:33 PM
Go to a command prompt and type "dir /s". If that's not the kind of listing you want, try "dir /s /b". If that's not it either, try "tree /f".

If you find one that you like, redirect the output to a text file, i.e. "dir /s /b >c:\filename.txt".
Title: Re:How would you convert a directory and all of its contents to text file
Post by: iago on April 26, 2004, 12:38 PM
Quote from: Adron on April 26, 2004, 12:33 PM
Go to a command prompt and type "dir /s". If that's not the kind of listing you want, try "dir /s /b". If that's not it either, try "tree /f".

If you find one that you like, redirect the output to a text file, i.e. "dir /s /b >c:\filename.txt".

I did exactly that once, to document my friend's mp3s, and it worked fantastically.
Title: Re:How would you convert a directory and all of its contents to text file
Post by: Tontow on April 26, 2004, 01:19 PM
Perfict!!! thx very much you just saveed me from haveing to type those in manually :-X
Title: Re:How would you convert a directory and all of its contents to text file
Post by: FuzZ on April 27, 2004, 09:14 AM
Quote from: Adron on April 26, 2004, 12:33 PM
Go to a command prompt and type "dir /s". If that's not the kind of listing you want, try "dir /s /b". If that's not it either, try "tree /f".

If you find one that you like, redirect the output to a text file, i.e. "dir /s /b >c:\filename.txt".

half the time I just mIRC cause I always have one open lol


//echo 1 $findfile(C:\Mp3s\,*.*,0, write fileindex.txt $remove($1-,C:\Mp3s\))


But I think your method is much more efficient :)