Type in DOSKEY at the Command Line
You will see DOSKEY INSTALLED and this will record all your key strokes
DATE or DATE /T to display but does not ask you for a new date
TIME or TIME /T to display but does not ask you for a new time
Type in VER for version on the command line
FORMAT A:
DIR
DIR /W wide view of the directory
DIR /P /O alphabetical order, one screen at a time
DIR /OD order of date and time
DIR /OS order of file size
DIR /P /O-S lists in reverse order
CLS
DISKCOPY A: A:
EXIT
DOSKEY^/HISTORY^> ^H:\NAME OF YOUR FILE
DOSKEY^/HISTORY or Press F7
DIR /O /P /AH for hidden files
DIR /O /P /AR for read-only files
DIR /O /P /A for all directories and files
DIR *.XLS /O /P to select all files with the same file extension name.
DIR *PROJECTION.XLS /O /P to select files with the word "projection" anywhere in the filename.
SET to examine the current Windows environment
SET DIRCMD=/P /O to set the pause and alphabetical order
CD C:\
CD A:\
CD.. takes you back to the next level directory
TYPE Templates.txt
The pipe operator | redirects the output produced by one command so that then the output becomes input for another command. For example, the following command will display the output of an ASCII text file one screen or window at a time.
TYPE Templates.txt | MORE
The MORE command displays the output of the TYPE command one screen one screen or window at a time.
The SORT filter can take input from a command or a file, sort the input, and then display the results. The R is Reverse Switch.
SORT /R < Templates.txt
The FIND filter searches one or more ASCII text files for a specific string of text and then displays the results by file.
FIND "Sales" Templates.txt
To append or add, the output of a command to an existing file.
ECHO.>> "Sales Templates.txt"
To send output of a command, such as DIR, to the printer, redirect the output with specifying the device name of the printer.
DIR > PRN
COPY is versatile, internal command that you can use in a variety of ways.
COPY "Five Year Plan Templates.xls" "Five Year Plan Draft.xls"
RENAME or REN
Renames all files that have the first four characters of the filename
REN 2002* 2003*
DEL^ Templetes.doc DEL ^*.* DEL^ Templates* DEL ^*.chk
ERASE Templates.doc
You should always use the Prompt for Verification switch /P to display a prompt before deleting.
MOVE *.ppt Presentations - moves all the files with ppt extensions into a directory called Presentations
MOVE Cashflow.xls Business - moves the particular file Cashflow.xls into a directory called Business
C:\MOVE Cashflow.xls A: - moves a file from drive C: to the current directory on A:
MD Designs - makes a directory called Designs
COPY "Final Projects Report.doc: A:\Reports
TREE
TREE C:\ /A > hdtree.txt
To view a directory tree of your data disk CD /D A:\
TREE /F /A > BEFORETREE.TXT (/F displays the names of the files in each directory)
RD /S "New Folder" (/S displays a prompt that gives only a small margin of safety)
MOVE Training "\My Documents"
MOVE app* Training
MOVE *.* Training
REN Training Training1
A: DIR Sales*
C: DIR Sales* /S (/S searches for directories below the root directory)
ATTRIB /S | MORE
XCOPY . "A: \Training Normal Backup" /M /S (the period is the notation of the current directory, the Modify switch /M removes the archive attribute and the Subdirectory switch /S instructs the XCOPY command to copy all subdirectories and their files.
During rebooting watch the screen for information on which key to press it may be <DEL> F1, F2 or F10
FORMAT A: /U /S (/U will erase any information already on the diskette, /S copies the operating system file to the diskette after DOS formats it)
Windows: Run a program in MakeBoot.exe in the Win Folder
Command Line: CD D:MAKEBOOT A:
BIOSINFO.INF - info about using Setup, files with the "inf" contain info about configuring hardware/software (Information File)
DISK101 - ids the diskette number in the current set
NTDETECT.COM - checks your computer's hardware during boot up (Command file)
NTKRNLMP.EX - compressed program file that provides support for multiprocessors ( Executable file)
SETUPLDR.BIN - OS file that loads Win2000 setup (Binary File)
TXTSETUP.SIF - detailed information on installing Win2000 and providing support for hardware devices. (Setup Information File)
NTBACKUP Click on Emergency Repair Disk option, Insert a disk in Drive A:
Boot your computer from the Win2000 setup disks
Setup will ask you if you want to Setup, Repair, or Quit Setup w/o installing Win2000 (Choose Options accordingly)
CHKDSK A: /F (/F Fix Switch will repair certain types of problems, such as lost clusters.)
Install the Recovery Console
D:\>\i386\winnt32 /cmdcons
The Installation Dialog Box will pop up and Click on Yes to Install.
Hard Drive: when you see the OS choices menu press the down arrow
Select MS Win2000 Recovery Console
Recovery Console provides a limited set of commands that you can use to repair a Win2000 system that will not start or run properly.
Disclaimer: This is not intended to be an exclusive and comprehensive guide for the DOS Command Line.
![]()