The Windows Command Prompt is a handy tool that can help you configure various PC settings. All you need to do is type in the correct commands and you’re good to go. But therein lies the rub; you need to know what those commands are before you can use them!
However, there are plenty of cool things you can do with the Command Prompt that you may not know about. On top of that, you may not know that you can customize it to your liking. Let’s dive in and explore a few cool things about the Command Prompt.
1. Change the Prompt Text in the Command Prompt
When you open the Command Prompt, the default prompt text shows your current folder path or working directory. Usually, the default folder path is “C:\Windows\System32”.
If you want to change the initial prompt text, here’s how to do so:
- Press the Win + R to open the Run command dialog box.
- Type CMD and then press Ctrl + Shift + Enter to open an elevated Command Prompt.
- Type the following command and replace “New Text” with your preferred command. Press Enter when you're finished.
prompt New Text$g
Always include the “$g” text at the end of the prompt text. This adds the right-pointing arrow “>” so that you’d know where your command begins.
Now, let’s take a look at a few changes you can make to the prompt text.
If you want to add parentheses and other symbols to your prompt text, you can also do that. Here are the commands you’d need to enter:
- Left parenthesis: $c
- Right parentheses: $f
- Ampersand “&”: $a
- Pipe “|” symbol: $b
Here’s an example of how you could use these symbols in the Command Prompt:
prompt New Text $a CMD Number $cCMD Tricks $b CMD #3$f$g
You can also display the time, date, and Windows version number as the prompt text. To display the time, type the following command and press Enter:
To display the current date, type the following command and press Enter:
To display the Windows version number, type the following command and press Enter:
If you want to restore the prompt text to its default settings, type the following command and press Enter:
2. Change the Title in the Command Prompt
When you launch the Command Prompt, the title bar usually displays a text that reads “Administrator: C:\Windows\System32\CMD.exe.” If you’d like to change this name, here’s how to do it:
- Open an elevated Command Prompt.
- Type the following command and replace “New Title” with your preferred command. Press Enter when you finish.
title New Title
If you want to restore the title to its default, close the Command Prompt and relaunch it.
3. List All the Installed Apps on Your Device
There are various ways to list downloaded files on your Windows device. But did you know that the Command Prompt also offers a quick, simple way to do this?
Here’s how you can quickly list your downloaded files using the Command Prompt:
- Open an elevated Command Prompt.
- Type the following command and press Enter:
wmic product get name
4. Delete Any Files in the Temp Folder
Your Windows device regularly creates temporary files that hold information for specific tasks. But once those tasks are complete, the temporary files are useless and can end up consuming disk space. These files are stored in the Windows Temp folder, and you can get rid of them manually or by using a disk cleanup tool.
Alternatively, you can easily delete these files using the Command Prompt. Here’s how:
del /q /f /s %temp%\*
5. Find Information About Commands Easily
Before running a specific command, wouldn’t it be great to learn a little bit about it? For example, before running an SFC scan, you could first find out how this command works and how it could help you.
To do this, type the following command and press Enter:
The results will show you what SFC is and how it works. You’ll also see additional sub-commands that you can use together with the SFC command. In addition to this, you’ll also see examples of how you can run several SFC commands.
To find out more about other commands, type the following command and replace “your_command” with the relevant command:
6. Open the Command Prompt Within a Specific Directory
To run commands within a specific folder, you’d usually have to type in the folder path in the Command Prompt. But this can be tiring if your target folder is within several subfolders. However, you can avoid this by heading straight to your target folder and opening the Command Prompt there.
To get started, here’s what you could do:
- Press Win + E to open File Explorer.
- Navigate to your target folder.
- Type CMD in the target folder’s address bar and press Enter.
Alternatively, you can copy and paste the folder path to the Command Prompt. Here’s how you can do this:
- Navigate to the target folder and copy the file path in the address bar.
- Press Win + R to open the Run command dialog box.
- Type CMD and press Enter to open the Command Prompt.
- Type cd in the Command prompt, press the space bar and paste your folder path. Press Enter when you finish.
7. Save Your PC Specs and Other Information to a Text File
You probably know the various ways of checking your Windows PC specs. To do this with the Command Prompt, all you need to do is type systeminfo and press Enter.
But what if you want to save that information as a text file and send it to someone else? The Command Prompt can still help you with this.
To save your Command Prompt information as a text file, type the following command and press Enter:
systeminfo > folder_path\MySytemInfo.txt
Replace the folder_path command with your actual folder path. For example, here’s how your command could look like:
systeminfo > C:\Users\Admin\Desktop\Desktop_Apps\MySytemInfo.txt
Press Enter when you finish.
You could apply the same procedure in case you want to save other commands to a text file. And to avoid any issues, avoid using spaces on your folder path or file names. Instead, replace the spaces with underscores or hyphens.
Use the Windows Command Prompt Like a Pro
The Command Prompt tricks we’ve explored are quite easy to implement and can really come in handy. You can try them out or even discover tonnes of more Command Prompt tricks that are out there.