DOS command

Time:2021-9-27

1、 Path

I. drive letter switching

  1. Syntax:uppercaseLetter + ‘:’

    Example:

    C:\Users044>D:
    D:\>
  2. Syntax:‘cd /d ‘ + DriveLetter

    Example:

    D:\>cd /d C:
    C:\Users044>

II. Enter the folder

Syntax:‘cd ‘ + folderUri

be careful:

  • To switch to a folder with a different drive letter, you need to add the parameter ‘/ D’. For example: CD / D C: \ program files
  • The slash in folderuri is a forward slash ‘\’
  • Current directory syntax of folderuri: ‘. \’ (can be omitted) + URI
  • Folderuri returns the parent directory syntax: ‘.. \’ (repeatable) + URI

Example:

C:\>cd .\Program Files
C:\Program Files>cd Intel
C:\Program Files\Intel>cd ..\..
C:\>


2、 Documents

I. view all files in the current directory

Syntax: ‘dir’

Example:

C:\>dir
 The volume in drive C is the system
 The serial number of the volume is 1a1a-1111

 C: \ directory of

2020/10/15  09:42              Program Files
2020/09/22  15:16              Program Files (x86)
2020/07/06  14:19              Users
2020/10/09  08:47              Windows
               4 directories 6234284032 bytes available


II. Create a new folder

Syntax: ‘md ‘ + floderName

Example:

C:\>md test


III. delete folder

Syntax: ‘rd ‘ + floderName

be careful:There cannot be files in the folder.

Example:

C:\>rd test


IV. new file

Syntax: ‘cd>’ + fileName

Example:

C:\test>cd>test.txt


V. delete files

Syntax: ‘del ‘ + fileName

Example:

C:\test>del test.txt


3、 Routing

I. view IP configuration

Syntax:‘ipconfig’

Example:

C:\>ipconfig

Windows IP configuration


Ethernet adapter Ethernet:

   Connection specific DNS suffix
   Local link IPv6 address......: aa11:: 11A1: 1a11: Aa1: 11aa% 1
   IPv4 address......... 111.111.1.111
   Subnet mask......... 255.255.255.0
   Default gateway......... 111.111.1.1

Ethernet adapter VirtualBox host only network:

   Connection specific DNS suffix
   Local link IPv6 address......: aa11:: a11: a111:1111: a11% 1
   IPv4 address......... 111.111.11.1
   Subnet mask......... 255.255.255.0
   Default gateway

Ethernet adapter Bluetooth network connection:

   Media status......: media disconnected
   Connection specific DNS suffix


II. Test URL

Syntax:‘ping ‘ + url

Example:

C:\>ping www.cnblogs.com

Pinging www.cnblogs.com [101.37.113.127] with 32 bytes of data:
Reply from 101.37.113.127: byte = 32 time = 3MS TTL = 91
Reply from 101.37.113.127: byte = 32 time = 3MS TTL = 91
Reply from 101.37.113.127: byte = 32 time = 4ms TTL = 91
Reply from 101.37.113.127: byte = 32 time = 3MS TTL = 91

Ping statistics of 101.37.113.127:
    Packet: sent = 4, received = 4, lost = 0 (0% lost),
Estimated round trip time in milliseconds:
    Shortest = 3MS, longest = 4ms, average = 3MS


4、 Interface

I. clean the interface

Syntax:‘cls’

Example:

C:\>cls


II. Exit

Syntax:‘exit’

Example:

C:\>exit


5、 Apply

I. open application

  1. Calculator: ‘Calc’
  2. Drawing: ‘mspaint’
  3. Notepad: ‘Notepad’