Home : Tutorials
: Command Prompt : Command Prompt
Introduction
Command Prompt Introduction
Use the command prompt to manipulate files.
Command Prompt
To open command prompt…
- Windows 98, 98SE & ME
Click on Start --> Run type command
- Windows NT, 2000, XP
Click on Start --> Run type cmd
Copy files...
copy *.* c:\downloads
- copy all files from the current directory to c:\downloads
Move files...
move *.doc c:\mydocu~1
- move all .doc files from the current directory to
c:\My Documents
Deltree...
deltree c:\directory
- remove c:\directory and all it’s files and
sub-directories
Dir...
dir c:\windows
- give a listing of all the files under c:\windows
dir c:\windows /s
- give a listing of all the files under c:\windows
and all it's subdirectories
dir c:\windows\system > dir.txt
- output the dir command to a file called dir.txt
in your current directory (advanced)
dir /p
- press the Spacebar to advance to the next page of
the directory listing.
dir /w
- list the files in wide format (can be used with /p)
dir | more
- another way of getting a page by page list (use pipes |
to link commands) (advanced)
set dircmd=/o:e
- this will sort the results of dir by extension (/o:e
= sort by extension; /o:d = sort by date; /o:n
= sort by filename)
- add this line to autoexec.bat to make it permanent
(run sysedit to change that)