DEV Community

loading...

Windows command line cheatsheet

moniruzzamansaikat profile image Moniruzzaman Saikat ・Updated on ・1 min read
  1. Go forward : cd path\to\folder
  2. Go backward : cd ../..
  3. Show lists of files and directories : dir
  4. Show lists of files and directories with hidden files also : dir /a
  5. Clearing screen : cls
  6. Show specific type of files: dir *.png | dir *.jpg
  7. Help for a specific command: ipconfig /? | cls /?
  8. Create a new directory : mkdir myDir | mkdir path\to
  9. Remove or delete directories: if your directory is empty rmdir myDir else rmdir /S myDir
  10. Changing drivers : C: | D:
  11. Show path variables: path
  12. Show available drive names: wmic logicaldisk get name
  13. Change color: color 0B | color 90 or back to default just use color
  14. Creating a file : echo somecontent > file.txt
  15. Deleting file: del filename.ext
  16. Reading contents of a file: type file.ext\
  17. Override to a file : echo newcontent > samefile.ext
  18. Appending to a file : echo appendingcontent >> samefile.ext
  19. Copying files: copy test.txt mydir

Discussion (0)

pic
Editor guide