PC Pals Forum
Technical Help & Discussion => Windows PCs & Software: Help, News & Discussion => Topic started by: stoni90 on January 13, 2004, 04:18
-
well here is what i'm trying to do. i have a directory that contains 300 folders inside. these folders have some names of course, i want to make a .txt with all the names of the folders without writing them down by myself one by one. can anyone give me a solution? thanx in advance
-
Hi stoni90 :welcome:
There is a command line tool called tree in Windows XP that will do the job for you. It is probably available in Windows 2000, but I'm not sure about 98 :-\
Start a command prompt by pressing Start and Run, typing cmd (command on 98) at the prompt and pressing OK
At the command prompt type the following
tree <path> > temp.txt
where <path> is the fill path to the folder containing the folders you wish to document e.g. c:\temp\folders
The file temp.txt will then contain a list of folders looking siimilar to this:-
<br />Folder PATH listing<br />Volume serial number is 71FAE346 28AE:0441<br />C:\PC-PALS<br /> stats index.html_files<br /> usage_200309.html_files<br /> usage_200310.html_files<br /> usage_200311.html_files<br /> usage_200312.html_files<br />
Hope this helps :)
-
Its actually quite easy to do - you've already got all the things you need :)
Open up a command window (start->run->command)
Change to the directory you want to index e.g.
D:
cd mp3S
Then type the command:
dir *. /s /b > filename.txt
What this does is take a listing of directories only (the *.), runs through the subdirectories (the /s), doesn't put any extra information in (the /b) and then saves the results to a file (the > filename.txt)
If you want the filenames as well you would use:
dir *.* /s /b > filename.txt
Whereas if you want to sort them you would use:
dir *. /s /b /on > filename.txt
Where the /on sorts them on name. You could use /od for date, /os for size etc.
A full listing of the parameters DIR can take can be obtained by typing DIR /?.
The difference between this and TREE is that tree gives the structure included in the output.
Who'd have thought - two old gits both replying how to use command lines :)
-
Who'd have thought - two old gits both replying how to use command lines :)
Just don't forget you're an older git than me :P ;D
-
thanx and welcome
i found a better solution.
i downloaded printfolder pro a shareware program which prints the contents of any directory you put,plus can sort out only the folders. real sweet program. i recommend it