The command

As a programmer, you are required to master the most basic Windows-related Dos commands:

  • Where are Dos commands written? Write Dos commands in the Dos command window
  • Dos command window how to open the start menu –> run [shortcut key win+R] –> enter CMD –> Enter [default open black command window, this is Dos window]

Open icon:


Common Dos commands

The command instructions
– exit Exit the current Dos command window
-cls Clear the screen
-dir Lists all subfiles/subdirectories in the current directory
– CD Indicates the directory path Access directory path
-cd .. Return to the previous level
-cd \ Back to root
C: enter Switch drive

The CD command

  • CD command :change directory
  • How to use the CD command?
    • CD Path of the directory
  • But paths include absolute paths and relative paths
    • Absolute path: indicates the starting point from the drive letter of a disk
    • Relative path: indicates the starting point of the path from the current path
  • If the current path is c:\Users\administrator, type CD Desktop, where Desktop is a relative path from c:\Users\administrator. With the path \Users\Administrator as a starting point, start looking for the Desktop directory.
  • Suppose it is written like this: CD C: Users\Administrator\Desktop where C: Users\Administrator\Desktop is an absolute path.

How to copy content in Dos window

Click the right mouse button anywhere in the Dos window, then select the mark, then select the content to be copied, click the right mouse button anywhere in the Dos window, at this time the copied content has been to the clipboard. Paste it in the desired position