05 August 2015

Basic Command Prompt

Here are useful command in window:
  • list file or directory
C:\>ls
C:\>dir
  •  change directory or dirve
C:\>cd Newfolder
C:\>d:
D:\>c:
  • create or delete file and copy file
C:\>copy NUL EmptyFile.txt
C:\>del EmptyFile.txt
C:\>copy test1.txt test2.xt


  • create directory or delete directory
C:\>mkdir Newfolder

C:\>rmdir emptydir
C:\>rmdir nonemptydir
The directory is not empty.
C:\>rmdir /S nonemptydir
nonemptydir, Are you sure (Y/N)? y
C:\>