KM4 1.1 Introduction To Scripting & Windows Command-Line
KM4 1.1 Introduction To Scripting & Windows Command-Line
• Batch scripting
Coding & Logic
Coding & Logic
Coding & Logic
What is a scripting language?
Task 2
Let’s re-familiarise ourselves with the basics of the
Windows command prompt.
Task 2 - Solution
Let’s re-familiarise ourselves with the
basics of the Windows command prompt.
1) Open a command prompt
• Start / Run / cmd
2) Make a new directory in the root of the C:\ drive called “Driver
Backups”
• Mkdir “C:\Driver Backups” or md “C:\Driver Backups”
3) Copy all .sys files from “C:\Windows” to “C:\Driver Backups”
• Copy C:\Windows\system32\drivers\*.sys “C:\Driver Backups”
Windows Command Prompt
• Use the up and down arrows to cycle through previously entered commands
• Use the tab key to auto-complete when typing paths.
• Press F7 to see a list of previously entered commands
• Press F8 to match whatever you have partially typed against previously
entered commands
Windows Command Prompt
• Internal commands are built into cmd.exe and do not exist as separate
executable files
• cd cls color copy date del dir echo exit for goto if md mkdir mklink
move path pause prompt rd rmdir rem ren set start time title type
• External commands are executable files that exist on the operating
systems’ storage device
• Diskpart ipconfig netstat
Windows Command Prompt
Internal Commands
When using the Windows PowerShell, how can you find help for
a specific command?
When using the Windows PowerShell, how can you find help for
a specific command?
a) Echo %Username
b) Echo $Username
c) Echo %Username%
d) Echo $Username$
Quiz
a) Echo %Username
b) Echo $Username
c) Echo %Username%
d) Echo $Username$
Quiz
a) |
b) ?
c) *
d) >
Quiz
a) |
b) ?
c) *
d) >