Top 5 Windows Command Prompt Commands I Frequently Use

In the Windows world, command line interfaces are rarely used anymore, unlike in the UNIX world, where we still frequently use the terminal, even Arch Linux’s default installation uses full terminal commands. But nevertheless, sometimes you need to use some of these commands to get ahead, either it’s system failure, automation, or you just want to impress your friends.

Here are the top 5 Windows Command Prompt Commands I Frequently Use.

Cd

Cd is short for “Change Directory”. So, as the name implies, it is used to navigate between folders.

  • You can use Cd .. To go up one directory
  • For accessing folders in other drives, you have to first type the drive letter followed by “:”, then cd directory.
  • If the directory has spaces in them, enclose them in quotes, like below:
cd examples

dir

dir is the equivalent of the ls command in UNIX. It lists the directory in the folder, or you can specify it after the command like cd above.

tree

Tree is similar to the ls command above, but it serves the files in a tree-like format.

By default, tree only lists directories (folders). Use it with an /f switch to list files too.

You can pipe it into a file (save the output as) by using > after the command, followed by what you want the file name to be.

rename

Rename renames files. Syntax is rename, followed by source file, and then what you want the renamed file to be. Example below, tree is used to display file source and output.

You can do batch renames in conjunction with Microsoft Excel to make your series of commands using a batch file. Alternatively, you can use PowerRename in PowerToys to make the change, if you prefer a UI-based approach.

How to use PowerRename PowerToy for Windows 10
Powerrename screenshot, courtesy of The Windows Club.

You can also see Powertoys in my Top 12 Windows Applications I Always Install.

cls

cls is Clear Screen. It clears your current command prompt screen. Use it to tidy up.

Before cls
After cls

But you can still scroll recently used commands by using the up/down arrow. It just clears your screen.

Those are the top 5 command prompt commands I frequently use. Hope this helps!

This post is also available in id_ID.

Leave a Reply

Scroll to Top