Sponsor for PC Pals Forum

Author Topic: still can't find a solution nowhere in web  (Read 871 times)

Offline stoni90

  • New Member
  • *
  • Posts: 9
still can't find a solution nowhere in web
« 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

Adept

  • Guest
Re:still can't find a solution nowhere in web
« Reply #1 on: January 13, 2004, 07:39 »
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:-

Code: [Select]
<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 :)

Offline Dack

  • Established Member
  • ****
  • Posts: 831
Re:still can't find a solution nowhere in web
« Reply #2 on: January 13, 2004, 07:44 »
Its actually quite easy to do - you've already got all the things you need :)

Open up a command window (start-&gt;run-&gt;command)

Change to the directory you want to index e.g.

D:
cd mp3S

Then type the command:

dir *. /s /b &gt; 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 &gt; filename.txt)

If you want the filenames as well you would use:
dir *.* /s /b &gt; filename.txt

Whereas if you want to sort them you would use:
dir *. /s /b /on &gt; 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 :)
hey promised the earth! Then delivered mud.
Technically it did meet the spec.

Adept

  • Guest
Re:still can't find a solution nowhere in web
« Reply #3 on: January 13, 2004, 19:35 »

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


Offline stoni90

  • New Member
  • *
  • Posts: 9
Re:still can't find a solution nowhere in web
« Reply #4 on: January 13, 2004, 19:52 »
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


Show unread posts since last visit.
Sponsor for PC Pals Forum