?print-pdf
' Created for
Windows + R
, type cmd
, and press Enter. Alternatively, search for "Command Prompt" in the Start menu.C:\Users\YourUsername\Documents
and you run a command like dir Projects
, it will list contents of C:\Users\YourUsername\Documents\Projects
.cd
without arguments to see CWD:
# Assuming CWD is C:\Users\UserName
cd
# Output: C:\Users\UserName
cd
before executing commands to avoid unintended consequences, such as file deletions or incorrect script executions.dir
to list all the files and folders within your current directory.dir /a
# Assuming CWD is C:\Users\UserName\Documents
dir /a
# Output:
Volume in drive C has no label.
Volume Serial Number is 1234-5678
Directory of C:\Users\UserName\Documents
02/15/2024 10:00 AM <DIR> .
02/15/2024 10:00 AM <DIR> ..
02/15/2024 10:00 AM <DIR> Projects
02/15/2024 10:00 AM <DIR> Reports
02/15/2024 10:00 AM <DIR> Presentations
02/15/2024 10:00 AM <DIR> .hidden_folder
0 File(s) 0 bytes
6 Dir(s) 100,000,000,000 bytes free
cd [FolderName]
to move into a specific folder.
# Assuming CWD is C:\Users\UserName
cd Documents
# New CWD: C:\Users\UserName\Documents
# Assuming CWD is C:\Users\UserName
cd Documents\Projects\Cources
# New CWD: C:\Users\UserName\Documents\Projects\Cources
cd ..
to move up one directory level. This command takes you to the parent directory of your current location.
# Assuming CWD is C:\Users\UserName\Documents
cd ..
# New CWD: C:\Users\UserName
..
with backslashes.
# Assuming CWD is C:\Users\UserName\Documents
cd ..\..
# New CWD: C:\Users
These slides are based on
customised version of
framework