Windows Command Line Flashcards
What is located here?
C:\Windows\system32\cmd.exe
The windows command line
aka: cmd.exe
what does this do?
aa > file.txt
bb»_space; file.txt
type file.txt
write and create
write and append
read
“aa
bb”
what is the difference?
command1 & command2
command1 && command2
- execute both regardless of success
2. execute the later only if the former is sucessful
what is the difference?
command1 & command2
command1 && command2
- execute both regardless of success
2. execute the later only if the former is successful
what is the difference?
command1 & command2
command1 && command2
- execute both regardless of success
2. execute the later only if the former is successful
what is the difference?
command1 | command2
command1 || command2
- send output from first command to second command
2. if command1 fails execute command2
what file extension is used for Windows command line scripts?
.bat
what does the following mean?
SET x=qwe
if %x%==qwe (echo true)
if %x%==xyz (echo true)
if %x%==xyz (echo true) else (echo “does not contain xyz”)
these are windows comparison operators:
- sets the variable
- returns true
- returns nothing
- returns “does not contain xyz”
what does the following mean?
SET x=qwe
if %x%==qwe (echo true)
if %x%==xyz (echo true)
if %x%==xyz (echo true) else (echo “does not contain xyz”)
these are windows comparison operators:
- sets the variable
- returns true
- returns nothing
- returns “does not contain xyz”
What does the following do?
for %i in (.) do @echo FILE: %i
a for loop that lists files in a directory
”@” means to hide the prompt and just display the output