DOS
June 3, 2026 2 min read

Basic DOS Commands with examples

HS
HEMANT SINGH
Technical Writer & Educator
  1. CD
    1. Change the directory
    2. Example: cd desktop
  2. CLS
    1. Clear screen
    2. Example: cls
  3. MD
    1. Make directory
    2. Example: md capscom
  4. RD
    1. Remove directory
    2. Example: rd capscom
  5. DEL
    1. Delete a file
    2. Example: del data.txt
  6. DIR
    1. dir : List all the files and folder of current directory
    2. dir /s : List all the files and folder and subfolder with files 
    3. dir /a : List all the files with hidden files
  7. TREE
    1. Display list of folder and files in the form of tree.
    2. Example: tree
  8. REN
    1. To rename a folder and file
    2. Example: ren math.txt science.txt
  9. EDIT or echo
    1. To edit the file
    2. Example: edit science.txt
    3. Example: echo Hello>science.txt
  10. VER
    1. Display version of DOS
    2. Example: ver
  11. TYPE
    1. Display content of file
    2. Example: type science.txt
  12. VOL
    1. Display volume of current drive
    2. Example: vol
  13. DATE
    1. Display date
    2. Example : date 
  14. TIME
    1. Display time
    2. Example : time
  15. EXIT
    1. Exit from the dos/ close the dos software
    2. Example: exit
  16. MEM
    1. Display memory
    2. Example: mem
  17. COPY CON
    1. Create new file in current directory
    2. Example : copy con network.txt
  18. IPCONFIG /ALL
    1. Display network information
    2. Example : ipconfig/all
  19. COPY
    1. Copy one file to second file
    2. Example : copy first.txt second.txt
    3. copy to specific folder (capscom)
    4. Example:: copy first.txt capscom
    5. copy all files to specific folder(capscom)
    6. Example: copy data\* capscom