5 interesting Command Prompt tricks you have to try

If you want to have more control and flexibility in using your Windows computer, it’s no secret the Command prompt is the way to go.

Also known as cmd.exe, the Command prompt is a free command line interpreter that takes input through your keyboard to perform a host of functions. In this article, we’ll dive into the most interesting ways you can make use of your Command prompt. So let’s get started.

1. Encrypt your files with Cmd

By encrypting your files, you can encode them in a way that makes them inaccessible to other people without a password. And, with the help of Command prompt, you can encrypt your files without any hassles.

First off, head to the directory of your file. You’ll be using the cd command for that. For a quick refresher, see our guide on changing the directories using cmd.

After you’re inside the target directory, type in the following command and hit Enter:
cipher /e

command prompt

The keyword cipher here invokes the function for execution of encryption, while the parameter /e is necessary to encrypt specific files or directories. When used without parameters, the cipher command will also display the current state of encryption of your directories and any files inside the directory.

As soon as the command get executed, all the files in your present directory will get encrypted. To decrypt them back again, type in the following command in the cmd and hit Enter:
cipher /d

decrypting files with command prompt

Here, the parameter /d is necessary to decrypt the specified file or directory.

Another important thing to remember is that encryption only works in Enterprise and Pro editions of Windows.

2. SFC Command

The System File Checker is a free Windows tool that lets you scan and restore corrupted Windows files. You can run the System File Checker with the help of sfc /scannow. Make sure you launch the Command prompt as administrator first. From there, type in the command in the cmd and hit Enter:

sfc /scannow

sfc scan

The scan will be started and will probably only take about a couple of minutes to finish.

3. Command line history

There’s also a special command in the Command prompt that lets you view all the commands you’ve run so far in your cmd. This becomes specially helpful if you deal with Command prompt a lot. So, if you want to check out the command you ran an hour ago, all you’ve to do is type in this command and hit Enter.

doskey /history

command prompt

You’ll see the long list of all your commands through this command.

4. List all your directory files

So, you’re in a specific directory and now want to take a look at all the files in your folder? The cmd has a simple command that will display all your files easily.

Simply type in the dir in cmd and hit Enter, and all your files in the given directory will be shown in a list, as shown below.

dir command

5. Display all the Wi-Fi passwords

Command prompt comes with a sleek command that lets you see all the Wi-Fi passwords you’ve saved on your computer until now. The command is, let’s say, a little complicated. So, simply copy and paste the code into your cmd and hit Enter.

It's a two step process. First, type in this command in your cmd and hit Enter:

netsh wlan show profile

This will display all the Wi-Fi connected with your PC so far.

command prompt

From there, type in the following command and hit Enter:

netsh wlan show profile Wi-Fi name key=clear

In this command, replace the "Wi-Fi name" with the Wi-Fi whose password you'd like to see. In our case, this is Linksys. So the command will be become something like this:

netsh wlan show profile Linksys key=clear

cmd

The passwords of your Wi-Fi, along with other important information, will be shown in your command prompt screen. Look for the keyword 'Key Content' in your cmd—that holds the password of your Wi-Fi.

Things to do with Command Prompt

The Command prompt is probably one of the most handy utility in Windows operating system—just ask any power user. Whether you’re just starting out with the Command prompt, or are an experienced veteran already, you can always learn something new in the cmd.

The five commands above are some of the few ways you can use the cmd in creative ways.

Share This Post:

Older

Apple's AR/VR project began with Windows-powered prototypes

"Designer" could be Microsoft's newest Windows 11 app

Newer