CLOSE

You've Found Us! Now Stay Connected...

Sign Up for PCMech.com's FREE weekly newsletter. We'll help keep you informed on what's happening in the world of technology.


Privacy Policy | More Information

PCMech.com helps normal people get their geek on. We talk about computers, technology, the Internet, social media - anything that makes a geek feel warm and fuzzy inside.

Home | About | Newsletter | Forums | Advertise! | Store | Wordpress Help | Log in

Helping Normal People Get Their Geek On

Fear Not The Command Prompt, File Listings (Windows XP)

About this Post

Posted Apr 8, 2008
Operating Systems

About the Author

Rich Menga is PCMech's video guy, an author and part-time host of PCMech LIVE.
Rich's Website

imageHere are a few quick tips you can do from the command prompt in Windows XP (this will actually work in all versions of Windows since 3.1):

Getting a listing of every single frickin’ thing on your hard drive in a single text file

Command:

DIR /S C:\*.* > C:\all.txt

This will write a text file of every single file on your system (excluding hidden files) to the file all.txt in the root of C drive. It will take a while and the text file will be humongous. When I did this my end result text file was 9MB in size. For a text file, that’s huge.

If you try to open this file afterwards in Notepad, it will crash because Notepad can’t handle something this big. However, if you get a better text editor like Notepad++, you can open big honkin’ text files.

Reason why would you would want to to this: There is no easier way to get a complete listing of all files in Windows in a portable file. If you’re troubleshooting your computer and want to see where specific stuff is without clicking all over the place, this is the way to do it. And it’s unbelievably faster than listing files using the standard Windows search.

Getting a listing of a specific type of file using the same method

Command:

DIR /S C:\*.DOC > C:\alldocs.txt

This will write a text file called alldocs.txt to the root of C drive containing a listing of every single file on your system ending with DOC (i.e. Word documents).

Since this listing will be much smaller it can be opened in Notepad easily. Launch Notepad and open the file C:\alldocs.txt and you’re off to the races.

You can do this with any file extension. If you want to find all XLS (Excel) files, change *.DOC to *.XLS. If you want to find all JPG files, change *.DOC to *.JPG - you get the idea.

Common file extensions in Windows

  • Plain Text: TXT
  • Word: DOC
  • Excel: XLS
  • Video: AVI, WMV, MPG, MPEG, QT, MOV
  • Audio: WMA, MP3
  • Image: JPG, JPEG, GIF, PNG
  • Archive: ZIP, RAR
  • Executable file/installer: EXE, MSI

Subscribe To the PCMech Feed for more interesting posts and exclusive feed-only freebies. Our weekly newsletter will keep you up to date each week.

1 Comment(s)

  1. Matt said:
    4/8/2008 9:22 pm

    Thank you!!! Call me stupid, but I have been looking for a “program” to find every .mp3/.wav/ .wma etc file on my PC so I can look for duplicates. I need to learn more about the command prompt

    [Reply]

Post a Comment

Now Playing on PCMech Video

Feature ImageBasic Font Styles Using CSS

Feature ImageHow To Test WordPress Before Installing It

See All Videos | PCMech Channel Youtube Channel

Free Weekly Newsletter

Sign up! Exclusive weekly content, weekly rant, and more!

Name:
Email: | Privacy Policy
  | See Also Online Business Club

Subscribe to PCMech Feed

Subscriber Feed More Info

Or, via email. Exclusive, Feed-Only Content.

Sponsor


Recent Visitors