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

All Posts Tagged With: "command"

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

Send Emails From The Command Line

Continuing the subject of useful command line tools, I ran across one today which I am really thankful I found: Blat.

Blat is a command line SMTP mailer. It is simple to use, just “install” Blat by specifying the default SMTP server and from address to use and then you can email text files with a single command line instruction. This is ideal for backup or diagnostic warnings.

Again, this is a great tool to have and it sure beats my old method of piping text output from a file to the PHP command line…

Now Playing on PCMech Video

Feature ImageHow-To: Make a Super-Fast Pie Chart

Feature ImageMicrosoft Worldwide Telescope

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