DOS, CMD, and BAT Flashcards
T/F - When you are writing a Windows batch file, you must ensure that the commands are written in lowercase because they are case-sensitive
False
DOS was considered a _______ OS
Single Task
16 bit
Command line
GUI Interface
Single task, 16 bit, command line
In DOS, what is the command to see how many directories and files are in a drive?
D:>\dir
Which commands help you find more information about a specific command such as copy?
Help copy
Copy /?
T/F - In windows \CD takes you to the root (top) of the directory
True
What represents root in windows? What represents root in Linux?
C:\ and /
When using C:>dir | more what key jumps to the next page?
Space
The /I command in a batch file tells the interpreter to only use the ____ letter of the user input
First
T/F - “Echo off” command means the command interpreter will not display the command that you entered to run the batch file
True
When working in cmd, which command clears the screen?
cls
In DOS, “CD..” with 2 dots takes you
One directory back
The command to remove arch.txt is
Del arch.txt
in W10 the prompt is set to the C:> drive and you need access to the D: drive, what command do you use to switch?
D:
To view the contents of a folder in command prompt, you type
DIR
In a batch file “Echo Off” is usually placed at the
beginning
In batch files what two symbols follow a command in order to list the possible options the programmer has with said command?
/?
ie. command /?
What command is used to delete directories?
Remove Directory (rd)
Before deleting a directory at the top of a tree you must first delete its
sub-directories
T/F - The pause command in a bat file allows users a chance to review the material on the screen before continuing
True
If your batch file is disappearing too quickly, you must add
a pause command
SET ___ _ ______
SET sets a variable
If you get the message “access is denied” when running a batch file, it’s likely because you
Forgot the run the batch file as the administrator
This command ties together batch processing as it responds to the variable created by the set command
The If command
Extracts the first letter typed
If /i
With the __ switch you can instruct ___ to create a new variable based on the _____ ______
/p, set, users input
The GOTO command
tells command prompt to jump to a new location in the batch file
Types of commands in DOS
Internal vs External
Internal:
Command such as dir, copy, delete
External:
Smaller executable programs that the CPU would process then execute, like paint
Start Command Prompt
Start button, CMD in search box, right click CMD, run as admin
CD.. or Cd ..
takes you one directory back
To change to another drive just
type the drive letter (ex. E:)
Make a new directory using the ______ or __ command
MKDir or MD
To remove a directory, it has to be
Empty
If you’re trying to remove a directory you should not be
inside of it
dir | more
Pauses the screen page by page, use the spacebar to continue
What is the command to copy \testfile\testfile1.txt to the \testfile2\ folder, both folders are in the C: drive
C:>______________ ________
copy \testfile\testfile1.txt \testfile2
Use the __ switch when deleting ________ files
-h, hidden
to run a program from CMD,
Navigate to the directory that contains the executable, then type in the program name
Ex: C:\testfile\testfile.exe
ECHO is the ______ statement for BAT files
Anything following the word ECHO in a bat file will be
displayed in CMD as text
“Proper” backups involve making _________ __________ on a schedule, are ____________ and are ___ ___ in one place
multiple backups, automatic, not all