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

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
Free eBook!

Like what you read?

If so, please join over 28,000 people who receive our exclusive weekly newsletter and computer tips, and get FREE COPIES of 5 eBooks we created, as our gift to you for subscribing. Just enter your name and email below:

Post A Comment Using Facebook

  • Matt

    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

  • http://ahoier.livejournal.com adam

    you SAVED me. I’ve been looking around for YEARS, a simple way to “backup” all of my photos :) This makes it easy to find every directory I have dumped a photo in since I got my computer :)

    I actually “learned” of this command months back, but lost the reference, and a simple search dir command to find jpg brought me here :)

  • New

    Assista filmes, programas jornalísticos de entretenimento, culturais, documentários, canais de video clipes, programação adulta tudo ao vivo em seu computador pessoal ou notebook, em qualquer lugar do mundo em que você esteja
    http://www.tvdigitalnopc.com.br

What’s Your Preference?

Daily Alerts

Each day we send out a quick email to thousands of PCMECH readers to notify them of new posts. This email is just a short, plain email with titles and links to our latest posts. You can unsubscribe from this service at any time.

You can subscribe to it by leaving your email address in the following field and confirming your subscription when you get an email asking you to do so.

Enter your email address for
Daily Updates:

Weekly Newsletter

Running for over 6 years, the PCMECH weekly newsletter helps you keep tabs on the world of tech. Each issue includes news bits, an article, an exclusive rant as well as a download of the week. This newsletter is subscribed to by over 28,000 readers (many who also subscribe to the other option) - come join the community!

To subscribe to this weekly newsletter simply add your email address to the following field and then follow the confirmation prompts. You will be able to unsubscribe at any time.

Enter your email address for
Free Weekly Newsletter: