Billy's Blog

To post pictures and other goodies for free on the net.

My Photo
Name:
Location: Utah, United States

Born in Kapiolani Children's Medical Center, just a few blocks from Waikiki. Graduated from Kahuku High School. Rode BMX Freestyle for most of my life (more than 20 years), now my 8 year old son is ripping up the skate parks, but plans on getting drafted by the SeaHawks as a WR.

Friday, May 22, 2009

Print a list of your DIR (Folder)

Have you ever needed to send a list of files you have in a particular folder? There is always the "copy-and-paste-each-filename-one-at-a-time" way...
Here is another way to do it:

dir /b > output.txt

OK... that doesn't help many people that would be looking this up, only those that already know how to do it and forgot the syntax. Here is how you use that line effectively.

1. open the folder you want to list.
2. copy the address. (c:\my_stuff\stuff\)
3. open a DOS terminal.
4. If the prompt says C:\>_ (and your folder is in the C:\ drive) skip to #5, but if it says H:\>_ (or another letter than the root of your folder) follow the next few steps.
4a. Find the folder's root drive letter ('C' is your MAIN partition, but you might need D, E, F, G, etc... our example, c:\my_stuff\stuff\, uses 'C')
4b. Type the root letter, then a colon, then a space and 'cd', cd means "Change Directory" (like this):
c: cd

4c. hit the "Enter" button
4d. Right-Click in the space next to your new prompt C:\>_, select Paste, you should still have the address from step #2 (you cant hit CTRL+V, it will show weird symbols)
4e. Hit enter

5. at the prompt (C:\>_) type:
dir /b > output.txt ... then hit enter
6. Go back to your folder in normal view, and you will see a new TXT file called "output", w00t! ! !
7. If you want to be brave, change 'output' in step #5 to something else, you will get a different named TXT file.

0 Comments:

Post a Comment

<< Home