Home > Mods and hacks, Smart Tip, Win 7, Win XP, Windows > Best Command Prompt Tricks

Best Command Prompt Tricks

If you are a windows Power User, then you already might be knowing a lot of this tricks but for the uninitiated, here are some Windows command line tricks that might make your life easier.

Save A List of Files to a Text File by Extension

dir *.mp3 /s /b > files.txt

This command line will create a file called files.txt in the same folder. When you open this file, there will be a complete list of all the .mp3 files in that directory and all subdirectories. Replace .mp3 with the extension you want

Get Your IP Address Information

ipconfig /all

This will retrieve a pile of information about your network connection and IP information. From this command, you can get:

  • Host Name
  • Primary DNS Suffix
  • Node Type
  • IP Routing Enabled
  • WINS Proxy Enabled
  • DNS Suffix Search List
  • Connection-specific DNS Suffix
  • Network Adapter Description
  • Physical (MAC) Address
  • DHCP Enabled
  • IP Address
  • Subnet Mask
  • Default Gateway
  • DNS Servers

Get Installed Driver Information


This is very useful when you are troubleshooting someone’s pc without any external tools. This command will give you a complete listing of the drivers and when they were installed.

 driverquery > drivers.txt

This will output the list to a text file.

Copy Files Via Infrared Port

 irftp filename

This will fire up the Wireless Link dialog so that you can copy the specified file via an infrared port.

Find Files Opened By Network Users

 openfiles /query

If you are running a system and you want to know who has Shared files open on your computer, this command will provide you a list of those users and the files that they have opened.

Monitor Port Activity

 netstat -a 30

This will show you all of the TCP/IP ports that are being used on your system and what they are connecting to (or being connected from). It will refresh the information every 30 seconds.

Recover Information From A Corrupt File (Very Useful Command!!!)

 recover filename

If you have a disk with damaged sectors, you can attempt to recover as much information as possible from the damaged file. Data that is not damaged can be retrieved but data in damaged sectors will be lost.

Retrieve Detailed System Information


With this command, you can retrieve the following information:

  • Host Name
  • OS Name
  • OS Version
  • OS Manufacturer
  • OS Configuration
  • OS Build Type
  • Registered Owner
  • Registered Organization
  • Product ID
  • Original Install Date
  • System Up Time
  • System Manufacturer
  • System Model
  • System type
  • Processor(s)
  • BIOS Version
  • Windows Directory
  • System Directory
  • Boot Device
  • System Locale
  • Input Locale
  • Time Zone
  • Total Physical Memory
  • Available Physical Memory
  • Virtual Memory Max Size
  • Virtual Memory Available
  • Virtual Memory In Use
  • Page File Location(s)
  • Domain
  • Logon Server
  • Hotfix(s)
  • NetWork Card(s)

Map A Drive Letter to a Folder

 subst Z: D:\Movies

Sometimes, your directory structure can get pretty deep and complicated. You can simplify this a bit by mapping a drive letter to commonly used folders. For e.g. the above command will create a drive letter Z: and map it to the D:\Movies directory. Then, whenever you go into My Computer, you will see a Z: drive and when you browse to it, it will automatically take you to the contents of the D:\Movies folder. Useful to create Virtual Drives on your PC.

Note : You can only do this with an unused drive letter.

List All Tasks Running On The Computer


This is the command line version of the processes tab in Taks Manager. Useful when Task Manager is not Responding!!! 😛

Kill A Program

 taskkill /im programname /f 

If, when using the tasklist command, you discover that there is some process running that you want to kill, then this is the way to do it!

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: