Windows Command Line Flashcards
Command to change directories
cd
Command to change directories example
cd Jake
Command to go to parent directory
cd ..
Command to go back two parent directories
cd ../..
Command to change two directories example
cd Jake\Desktop
Command to autocomplete
Tab
Command to view the contents of a directory
dir
Command to view the contents of a directory you’re not currently in example
dir Desktop\data
Command to show hidden directories as well
/a
Command to show hidden directories as well example
dir /a
Command to clear the command line
cls
Command to only list files of a certain type
*
Command to only list files of a certain type example
dir *.png
Command to reach previous commands
up arrow
Command to open a file in the default program
name of file
Command to find what any command does
/?
Command to find what any command does example
ipconfig /?
Command to make a new directory
mkdir
Command to make a new directory example
mkdir Photos
Command to delete a directory
rmdir
Command to delete a directory example
rmdir Photos
Command to delete a directory with folders in it
rmdir /s
Command to delete a directory with folders in it example
rmdir /s Photos
Button to move to the beginning of the text
home
Button to move to the end of the text
end
Button to move a full word to the left
ctrl + ←
Button to move a full word to the right
ctrl + →
Absolute path definition
Typing in the full name of the folder to go there directly
Absolute path example
C:\Program Files\Google
Command to go into another drive
drive name:
Command to go into another drive example
D:
Command to create a tree of all the folders and files contained within
tree
Command to change the color of the background/text
color
Command to change the color of the background/text example
color 02
Digits for black background and bright green text (matrix)
0A
Command to change the color of the background/text back to the default
color
Command to find all the color options
color /?
Command to find the attributes of the files of the directory you’re in
attrib
Command to add an attribute to a file
attrib +
Command to add an attribute to a file example
attrib +h bacon.txt
Command to enter text into a new file
echo >
Command to enter text into a new file example
echo I like Monty Python > monty.txt
Command to delete a file
del
Command to delete a file example
del monty.txt
Command to print the contents of a file
type
Command to print the contents of a file example
type monty.txt
Command to overwrite the contents of a file
echo >
Command to add text to the end of a file
echo»_space;
Command to add text to the end of a file example
echo tunafish»_space; monty.txt
Command to print a directory as a text file
dir >
Command to print a directory as a text file example
dir > directory.txt
Command to copy a file into a folder
copy
Command to copy a file into a folder example
copy bucky.txt TestFolder
Command to copy the files in a folder into another folder
xcopy
Command to copy the files in a folder into another folder example
xcopy Apples Bacon
Command to copy the files and folders within a folder into another folder
xcopy /s
Command to copy the files and folders within a folder into another folder example
xcopy Apples Bacon /s
Command to move a file or folder into another folder
move
Command to move a file or folder into another folder example
move sample.txt Bacon
Command to rename a file or folder
rename
Command to rename a file or folder example
rename bacon ham
Color shortcut for 0
Black
Color shortcut for 1
Blue
Color shortcut for 2
Green
Color shortcut for 3
Aqua
Color shortcut for 4
Red
Color shortcut for 5
Purple
Color shortcut for 6
Yellow
Color shortcut for 7
White
Color shortcut for 8
Gray
Color shortcut for 9
Light Blue
Color shortcut for A
Light Green
Color shortcut for B
Light Aqua
Color shortcut for C
Light Red
Color shortcut for D
Light Purple
Color shortcut for E
Light Yellow
Color shortcut for F
Bright White