1.Get help on almost every Command
Simply type ‘/?‘ at the end of the command you want the info.
2.Useful Function Keys
You can use function keys in command prompt.
- F1: Pastes per character last used command
- F2: Pastes last used command only to a specified command character
- F3: Pastes Last used command
- F4: Delete command only to a specified command character
- F5: Pastes last used command without cycling
- F6: Pastes ^Z
- F7: Provides a list of already used commands (selectable)
- F:8 Pastes cycleable used commands
- F9: Will let you paste command from the list of recently used commands
3.Copy Data from Command Prompt
You can copy data from command prompt simply by following these steps:
1.Right Click in cmd window.
3.Mark using left click.
4.Copy using Enter.
You can enter the copied data anywhere.
4.Save a command in file
You can save a command in a file for future reference.
Just add “> (destination/file name with .txt extension)”
e.g. “ipconfig > c:\Networkdetails.txt”
This command will create a .txt file in C drive with name “Networkdetails”.
5.Check IP address of any Website
Simply write “nslookup website” .
e.g. nslookup rajat6397.wordpress.com
6.Use Multiple Commands
Simply add both commands with ‘&&’.
e.g. ipconfig && dir
7.Get PC drivers’ list
you cansee all the drivers installed in your PC along with, Name, Type and Link date just by one command “drivequery“.
8.Check Default Programs
You can check which applications are used to open which type of programmes.
Just you need to type “assoc“.
- Right Click on the top.
- Select Properties.
- Select Colors.
10.Make undelete-able Folders
- Type drive name(other than drive where windows is installed ) .
- Type “md con\” or “md lpt1\”
- To delete: replace “md con\” with “rd con\” or “md lpt1\” with “rd lpt1\”.
11.Get Network Details
- Type “ipconfig” and press Enter.
12.Hide Files and Folders
- Type drive name where folder is located.
- Enter “Attrib +h +s +r”.
- Enter name of file or folder you want to hide.
- e.g. “D: Attrib +h +s +r rajat”
13.Compare two files
type “fc C:\rajat\sample1.txt C:\rajat\sample2.txt” and hit enter to get comparison of both files with answer such as, files are different or both files are identical.
14.Create Wi-Fi Hotspot using Command Prompt
You can easily create WiFi hotspot by following these steps:
- Type:“netsh wlan set hostednetwork mode=allow ssid=Hotspotname key=password”
- To Start Type: “netsh wlan start hostednetwork”
- To Stop Type: “netsh wlan stop hostednetwork“
- Go to :“Control Panel>Network and Sharing>Change adaptor settings
- right click on the internet connection you are using
- Click Properties
- Go to Sharing.
- Check the option :“Allow other network users to connect through this computer’s internet connection”.
15.Shut Down Computer With Commands
- Shut down: shutdown -s
- Restart: shutdown -r
- Log Off: shutdown -l
16.Shutdown Computer In specified Time
- Type shutdown -s -t (time in seconds)
- e.g.shutdown -s -t 120
17.Print Message Before Shut Down
- Type : shutdown -s -t 500 -c “I am going to sleep”
18.Hide a folder
- Type: attrib +s +h Drive: filename
19.Unhide a folder
- Type : attrib -s -h Drive:filename
20.Netstat CMD Command
Netstat command is an important tool when you want to know about who is establishing a connection with your computer. The out of this command provide you the information about all active connection and listening ports.
You can use the Netstat command with following attributes
1. -a (display all connection).
2. -n (sorts connection in numerical order).
3. -b (display executable name. that is browser name).
These CMD tricks will definitely help you understand Command Prompt in a better way. If you happen to know some other trick which is worthy of a mention in the post, let us know in comments section.