Windows Command Prompt Tips (CMD tips)
Command Prompt, or CMD, is a familiar application used to run Windows commands, making operating the system a quicker and simpler way. At first glance, this seems to be a tool only for developers or those who have a passion for computer science, like tinkering with computers. However, CMD has many simple tips that even regular users can easily do.
To open Command Prompt, just go to the Start menu and type in search for 'cmd'. And then, try the tips below to see how this application can bring magic magic.
1. Schedule a computer shutdown
Let's start with a simple problem: You are downloading a large file, or rendering a super heavy video, for example. And you want your computer to shut down on its own after the process is complete, but you can't just sit by the side of your device all day long. A lot of programs have a built-in automatic feature, but if not, you can also use cmd to do that. Just one command line, you can schedule your computer to 'power down' right after the download or render is complete.
For example, if you want your computer to automatically shut down after an hour, just enter the command shutdown -s -t 3600 and you 're done. Inside:
- 'shutdown' is the immutable primary command;
- '-s' is a command that requires the computer to shut down completely. You can replace it with '-r' to reboot or '-l' to exit your account. (The 'Sleep' mode is a bit more complicated and requires a completely different command.)
- '-t' is the amount of time you want the timer to be measured in seconds. 3600 seconds equals 1 hour, and you can completely change this number, to 7200 for example (2 hours).
If you want to cancel a timer, just enter shutdown -a and you 're done.
2. Rename multiple files in one folder at the same time
Suppose you have a large folder with many files like photos or videos, named in order with confusing structure (like IMG_001.jpg for example). At this point, there will be many people who manually rename each file without their knowledge that cmd can help them do it in just one note. However, this method will still keep the original characters in the name of the file and add an optional phrase at the end.
First of all, you need to open cmd and enter the command: cd "C: UsersWhitsonPhotosChristmas 2020" - with the part of the quotes being the path to your folder. If this path contains spaces, double quotes must be used. Besides, you need to replace the phrase "Whitson" with the name of your user folder.
Next, you use the command rename *. * ??????? - original. * .
Inside:
- 'rename' is an immutable main command that requires your computer to change the file name.
- *. * means 'all files in the selected folder'. You can type extra characters like ' IMG *. * ' To limit IMG image files, or ' * .jpg ' to select JPEG files.
- '???????' is a command that requires to keep the first 7 characters of the original file - equivalent to 7 '?'. You can customize this quantity.
- ' -original ' is the phrase that you want to add to the names of the files and can be changed arbitrarily.
Result: If your folder contains IMG-00x files and you enter the above command, your file will be renamed IMG-00x-original.
3. Show Wi-Fi password
If you are a 'goldfish brain' and often forget the wifi password, you can absolutely use cmd to solve this problem, as long as the wifi network is saved on your device. Just enter the command netsh wlan show profile SmithHouse key = clear is done. In which ' SmithHouse ' is the name of the wifi network for which you need to retrieve the password and can change it optionally.
Alternatively, you can run the command netsh wlan show profile to display a list of the saved networks on your computer.
4. Wipe hard drive data
Most computer users will have to undergo at least 1 time to delete data and repartition the hard drive (or thanks to the 'holy' Windows installers) to clean up documents, or simply want to my device becomes a little 'cleaner'. Windows' built-in disk partition management software is also a frequently chosen option at the moment, but it's not really flexible enough to clean up your data.
You can completely use the Diskpart command to handle problems related to reinstalling or 'scratching back and forth' hard drive, flash drive or SD card. Instead of opening a command prompt, you can use the Diskpart tool by clicking on the Start menu and searching for the term 'diskpart'. Then, a command prompt will appear and you need to enter the command line list disk . Next, you find the drive you want to delete data from and enter select disk 0 (or a different number depending on your drive). Finally, you type the command clean and you are done.
Your system will wipe the hard drive data clean without leaving any hidden partitions behind. Then you can go to the Start menu, search for 'Disk Management' and right-click on the drive of your choice to set it up and format it.
However, it should be noted that there are some types of data that will not be completely erased, but can still be recovered with some specialized software. If you want your data really 'colorless' completely, you have to perform a little reset by right-clicking the drive in Windows Explorer> Format> unchecking the Quick Format box .
5. Access a list of all programs installed on your computer
When you buy a new laptop, or reinstall Windows for your machine, you are more likely to forget some frequently used tools and software, to the point that you think it comes by default with the operating system. by Microsoft. To prevent this from happening, you can completely use cmd to access the entire list of applications on your computer, before cleaning the hard drive.
Unlike the above tasks, this command must be executed from PowerShell - a new, more powerful tool built into Windows. Go to the Start menu, search for ' PowerShell ' and open a new window. Then you need to enter the following command:
Get-ItemProperty HKLM:SoftwareMicrosoftWindowsCurrentVersionUninstall*,
HKLM:SoftwareWow6432NodeMicrosoftWindowsCurrentVersionUninstall*,
HKCU:SoftwareMicrosoftWindowsCurrentVersionUninstall* | Select-Object
DisplayName, DisplayVersion, Publisher, Size, InstallDate | Format-Table -AutoSize >
C:UsersWhitsonDesktopProgramsList.txt
After entering the command, you will receive a .txt file listing all the programs on your computer.
In there, replace the phrase 'Whitson' with the name of the user folder on your computer to make this command more accurate and export the .txt file to your desktop. This file, called Program List, includes all the programs that are currently installed on the computer but does not include applications downloaded from the Windows Store. However, you can also add to this list by typing:
Get-AppxPackage> C: UsersWhitsonDesktopStoreProgramsList.txt
(Remember to replace the 'Whitson' phrase as above).
6. Watch Star Wars in coding style
To do this, you first need to go to the Start menu and search for ' turn windows features on or off ' and then tick the Telnet client option . Next, open cmd and enter the command line:
telnet towel.blinkenlights.nl
This weird version of Star Wars can be viewed in cmd with a simple command.
And so you can watch Star Wars in the ASCII version (the US standard for encoding information exchange) already.
You should read it
- How to use the command history function in Command Prompt
- How to Open Folders in CMD
- How to open Command Prompt on Windows 10, 8, 7, Vista and XP
- Instructions for using Command Prompt
- Add Command Prompt to Power User Menu on Windows 10
- How to Customize the Font in Windows Command Prompt
- How to Create a Custom Windows Command Prompt
- Windows prompt
- 6 Best Command Prompt Alternatives for Windows
- How to change the folder in Command Prompt on Windows 10
- How to Execute a Program in Command Prompt
- How to fix the error of Command Prompt opening automatically on Windows
Maybe you are interested
What to do when open command window here does not appear?
How to switch users on the Linux command line
How to fix Mac Homebrew error 'zsh: command not found: brew'
What is the Command key on Windows?
How to use read command in Linux
Basic Linux commands everyone needs to know - Operations on Linux are much faster