+

Cookies on the Business Insider India website

Business Insider India has updated its Privacy and Cookie policy. We use cookies to ensure that we give you the better experience on our website. If you continue without changing your settings, we\'ll assume that you are happy to receive all cookies on the Business Insider India website. However, you can change your cookie setting at any time by clicking on our Cookie Policy at any time. You can also see our Privacy Policy.

Close
HomeQuizzoneWhatsappShare Flash Reads
 

The 30 most useful Command Prompt commands for editing files and managing your PC

Jul 9, 2021, 23:29 IST
Business Insider
If you're going to use the Command Prompt, you need to know its commands. Chalirmpoj Pimpisarn/EyeEm/Getty Images
  • Command Prompt commands let you manage your computer just by typing.
  • Some Command Prompt commands let you move files, while others let you change your internet settings.
  • Here are some of the most useful Command Prompt commands, and what they do.
Advertisement

The Command Prompt isn't pretty, but it's one of the most powerful apps on your PC. With it, you can move or delete files, change your Wi-Fi settings, lock your hard drive, and even shut down the computer.

But to use Command Prompt, you'll need to know the commands for it. Here are some of the most useful commands, along with explanations of what they'll do.

The essential Command Prompt commands

We'll sort these commands into a few different groups, based on what they're used for.

Important: This is a list of base commands, some of which will work right away, some of which only work in specific situations, and most of which will only work if you add more text or commands afterwards.

It would be impossible to list every use case for each command, so if a certain command doesn't work right away, carefully read the error that Command Prompt gives you or do more research online for your specific use case. You can also type the command and then add a space and /? for examples of how to use it.

Advertisement

Basic commands include closing apps and moving files. Carolyn Ann Ryan/Getty Images

Managing your apps

CommandWhat it does
AtLets you schedule apps or other commands to run at a specific date and time
MsiexecStarts Windows Installer, an app that helps you properly install software
TaskkillEnds a program or process that you specify
TasklistShows you every app, service, and process currently running on your computer

Editing files

CommandWhat it does
AssocLets you change which programs are used to open different types of files
CompCompares two or more files, or sets of files
DelDeletes a specified file
MakecabCreates a CAB file, which can compress and store data just like a ZIP file
MoveLets you move files from one folder to another
PrintSends a specified text file to a specified printer
RecoverScans a specified disk and retrieves all the readable data on it - great for recovering files from corrupted hard drives
RobocopyLets you copy files, folders, and more from one location to another
TreeShows you the folder structure for a specified drive or location

Some Command Prompt commands let you troubleshoot computer or internet issues. Richard Drury/Getty Images

Managing Windows

CommandWhat it does
ChdirTells you the name of the directory you're currently working from, and lets you change it
ChkdskScans your hard drive for errors and tries to fix them
CmdkeyLets you view, create, or delete stored usernames and passwords
DefragDefragments the hard drive, reorganizing the files to make data retrieval faster and more efficient
DriverqueryGives you a list of all the drivers installed on your computer
FormatFormats a specified drive, erasing all the data on it
IpconfigShows details about your internet connections, and lets you refresh your IP addresses
NetLets you view and edit network settings
RegLets you manage the Windows Registry by adding keys, exporting data, and more
SfcScans, verifies, and replaces important Windows system files
ShutdownLets you shut down or restart your computer
VerShows the current Windows version number
VolTells you the volume label and serial number of a specified hard drive

Miscellaneous

CommandWhat it does
ClipAutomatically copies the output of any command to the clipboard
ClsResets the Command Prompt and clears all the text
ColorLets you change the Command Prompt's text and background colors
HelpGenerates a list of example commands, just like this one
How to zip and unzip files in Windows 10Alt + F4: The Windows keyboard shortcut for closing applications, explainedWhat is Secure Boot? A guide to your PC's security check during startupHow to check the power supply on your PC, a crucial step before upgrading it
You are subscribed to notifications!
Looks like you've blocked notifications!
Next Article