
Windows Command Prompt Cheatsheet
-Command line interface (as opposed to a GUI - graphical user interface)
-Used to execute programs
-Commands are small programs that do something useful
-There are many commands already included with Windows, but we will use a few.
-A filepath is where you are in the filesystem
•C: is the C drive
•C:\user\Documents is the Documents folder
•C:\user\Documents\hello.c is a file in the Documents folder
Displays a list of a folder’s files
and subfolders
dir (shows current folder)
dir myfolder
Displays the name of the current
directory or changes the current
folder.
cd filepath
chdir filepath
cd .. (goes one directory up)
Creates a folder (directory)
md folder-name
mkdir folder-name
Deletes a folder (directory)
rm folder-name
rmdir folder-name
rm /s folder-name
rmdir /s folder-name
Note: if the folder isn’t empty,
you must add the /s.
Copies a file from one location to
another
copy filepath-from filepath-to
Moves file from one folder to
another
move folder1\file.txt folder2\
Changes the name of a file
Deletes one or more files
Exits batch script or current
command control
Used to display a message or to
turn off/on messages in batch
scripts
Displays contents of a text file
Compares two files and displays
the difference between them
Provides more details about
DOS/Command Prompt
commands
help (lists all commands)
help command
Source: https://technet.microsoft.com/en-us/library/cc754340.aspx