CMD1 USAGE Flashcards
WAYS OF USAGE: Compares two files and displays the difference between them
fc file1 file2
WAYS OF USAGE: Deletes a folder (directory) - folder is empty
rm folder-name
rmdir folder-name
WAYS OF USAGE: Copies a file from one location to another
copy filepath-from filepath-to
WAYS OF USAGE: Creates a folder (directory)
md folder-name mkdir folder-name
WAYS OF USAGE: Used to display a message or to turn off/on messages in batch scripts
echo message
WAYS OF USAGE: Moves file from one folder to another
move folder1\file.txt folder2\
WAYS OF USAGE: Deletes a folder (directory) - folder is NOT empty
rm /s folder-name
rmdir /s folder-name
SYNTAX: Displays a list of a specific folder’s files and subfolders
dir (shows current folder)
dir myfolder
WAYS OF USAGE: Changes the name of a file
ren file1 file2
WAYS OF USAGE: Provides more details about DOS/Command Prompt commands
help (lists all commands) help command
WAYS OF USAGE: Displays the name of the current directory or changes the current folder.
cd filepath
chdir filepath
cd .. (goes one directory up)
WAYS OF USAGE: Exits batch script or current command control
exit
WAYS OF USAGE: Deletes one or more files
del filename
WAYS OF USAGE: Displays contents of a text file
type myfile.txt
WAYS OF USAGE: Clears the screen
cls