Command Prompt Tricks, Hacks & Codes

The Command Prompt is one of the most powerful tools in Windows; but sadly, it is also the most ignored one. Things were not always like this; but with the advent of GUI based operating systems, people started feeling that computing through command based tools was boring. This ultimately led the Command Prompt into obscurity.

However, the Command Prompt is not useless. In fact, it can be pretty useful. This article provides some excellent tricks, secrets and hacks that will make you realize that the Windows Command Prompt is not only useful but also a tool that you should definitely give more respect to.

Ascii star wars Command Prompt
1-Watch ASCII version of the Star Wars Episode IV movie
Surprised yet? You can watch an ASCII version of a part of Star Wars Episode IV movie right in your Command Prompt window. Just open the Command Prompt, type a small code and the movie will start playing immediately. Read the complete instructions here.

2- Create Matrix falling code effect
Have you watched “The Matrix”? Of course, you have. Then, you already know what I am talking about. In case you still don't know what I mean, take a look at this image! You can create the same effect in the Command Prompt using just a few lines of code. Head over to this post for instructions.

command prompt tricks

3- Make Folders that you cannot delete or rename
Want to create folders that you cannot delete or rename? You can learn how to make undeletable folders and unrenamable folders here.

4- Shutdown your computer giving a funny reason
What if your computer shuts down saying that it is tired and doesn't want to work anymore? It would be fun, wouldn't it? You can do so by reading the instructions here.

5- Use System File Checker to verify the integrity of critical Windows files and repair missing and corrupt ones
If you are worried about the integrity of your Windows files, then this trick will be of help in scanning and repairing missing, deleted and corrupt Windows files. To do so, follow the steps given below:-
1) Run the Command Prompt as an Administrator (Elevated Command Prompt in newer versions of Windows.)
If you are on Windows 7, go to Start>Programs>Accessories and right click on Command Prompt and select Run as Administrator. Windows 8 and 8.1 users, search for CMD on the Start screen and in the results returned, right click on Command Prompt and select Run as Administrator. Windows 10 users, search for CMD in the Start Menu and press Ctrl+Shift+Enter.
2) Execute sfc /scannow to scan and repair critical missing and corrupt Windows files. The process takes some time but will ensure that your critical Windows files are all present and have not been tampered with in any way.

After successful verification and repair, Windows Resource Protection will display a summary with the status of your system.

6- Know your IP address, DNS Server's address and a lot more about your Internet Connection
The Command Prompt can even let you know your IP address. Just type ipconfig/ all in the Command Prompt and press Enter. Along with your IP address and DNS servers, the Command Prompt will also return a ton of information like your host name, primary DNS suffix, node type, whether IP Routing ,Wins Proxy, and DHCP are enabled, your network adapter's description, your physical (MAC) address etc .

7- Know if your neighbours are stealing your WiFi connection
command prompt codes
The Command Prompt can let you know if someone is connected to your Local Area Connection and using it. Just follow the steps:-
1) Open your browser and visit http://192.168.1.1 or http://192.168.0.1 depending on your router.
2) Find the tab that mentions “Attached Devices” or something similar.
3) Find the computer name, IP address and MAC Address (sometimes called Physical Address or Hardware Address) of your computer using the previous trick.
4) Compare it with those displayed by your router in Step 2. If you notice some strange devices, then your neighbour has been sneaking in on your internet connection and it is best to add a password.

8- Know if someone is hacking your computer/ Trace a Hacker
Command Prompt hacks
Want to know if someone is hacking your computer? The Command Prompt can help you find if someone you don't know is connected to your computer stealing private data. Just execute netstat -a and the Command Prompt will return a list of computers that your computer is connected to. In the results returned, Proto column gives the type of data transmission taking place (TCP or UDP) , Local address column gives the port with which your computer is connected to an external computer and the Foreign Address column gives the external computer you are connected to along with the port being used for the connection. State gives the state of the connection (whether a connection is actually established, or waiting for transmission or is “Timed Out”).

9- Get a list of installed Windows drivers
To get a list of all installed drivers on your PC along with installation dates for each driver, execute driverquery in the Command Prompt.

10- Get information about your system
To get information about your system including PC name, time zone, OS version, system manufacturer, list of installed hotfixes and much more, execute systeminfo in the Command Prompt.

11- Get the IP address of any website
To get the IP address of any website, execute ping website address in the Command Prompt. For example: To get the IP address of this blog, execute ping www.tweakandtrick.com in the Command Prompt.

12- Get a list of currently running tasks
To get a list of currently running tasks with their memory usages, execute tasklist in the Command Prompt.

13- Password protect folders without any software
To create a password protected folder using some basic batch file coding, take a look at this page for details.

14- Convert FAT32 to NTFS without formatting or losing data
To convert your FAT32 formatted storage devices to NTFS without losing data, see this post for details.

15- Get a large list of most Command Prompt commands
Want to get a list of most Command Prompt codes along with basic descriptions about each? Just execute help in the Command Prompt and CMD will return a big list of Command Prompt commands on your screen. To get more details about a particular command individually, execute help [command] in the Command Prompt. Example: To get more details about the CD (Change Directory) command, execute help CD in the Command Prompt.

Note: Certain commands are not supported by the help utility. Their descriptions can be found by executing [command] /?. Example: To get details of the ipconfig command, execute ipconfig /? in the Command Prompt.

16- Check energy efficiency report and battery health report using the Command Prompt

These two tricks only work on Windows 10 and other recent versions of Windows.

To check the energy efficiency report for your PC, open the Command Prompt as an Administrator and execute powercfg/energy. Your system will be observed for a period of 60 seconds and results of the analysis including errors and warnings about energy efficiency will be generated in a file named energy-report.html in the Windows\System32 folder in the system drive. Opening the file from the System32 folder will show the energy efficiency report for your PC.

Note: Battery health report is only applicable for computers running on a battery.

To get the battery health report for your PC, open the Command Prompt as an Administrator and execute powercfg/batteryreport and a file named battery-report.html with the results will be created in the Windows\System32 folder in the system drive. Opening the file from the System32 folder will show the battery health report for your PC.

These tricks work on Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista, Windows XP and all previous versions of Windows unless otherwise stated.

Now you know just how useful the Command Prompt can be. Find more tips and tricks in the Tricks section.

Author About

Akhilesh Sharma maintains and writes Tweak And Trick. He is a technology enthusiast and a science student.
You can contact him at tweakandtrick@gmail.com.

read more >>
Featured Posts