Friday, August 3, 2007

DOS commands!!

Internal Commands
BREAK
CALL
CHCP
CHDIR(CD)
CLS
COPY
CTTY
DATE
DEL(ERASE)
DIR
ECHO
EXIT
FOR
GOTO
IF
MKDIR(MD)
PATH
PAUSE
PROMPT
REM
RENAME(REN)
RMDIR(RD)
SET
SHIFT
TIME
TYPE
VER
VERIFY
VOL


Back to the top

External Commands
APPEND.EXE
ASSIGN.COM
ATTRIB.EXE
BACKUP.EXE
CHKDSK.EXE
COMMAND.COM
COMP.EXE
DEBUG.EXE
DISKCOMP.COM
DISKCOPY.COM
DOSKEY.COM
DOSSHELL.COM
EDIT.COM
EDLIN.EXE
EMM386.EXE
EXE2BIN.EXE
EXPAND.EXE
FASTOPEN.EXE
FC.EXE
FDISK.EXE
FORMAT.COM
GRAFTABLE.COM
GRAPHICS.COM
HELP.EXE
JOIN.EXE
KEYB.COM
LABEL.EXE
MEM.EXE
MIRROR.COM
MODE.COM
MORE.COM
NLSFUNC.EXE
PRINT.EXE
QBASIC.EXE
RECOVER.EXE
REPLACE.EXE
RESTORE.EXE
SETVER.EXE
SHARE.EXE
SORT.EXE
SUBST.EXE
SYS.COM
TREE.COM
UNDELETE.EXE
UNFORMAT.COM
XCOPY.EXE

More information on this topic can























ABOUT ATTRIB
Attrib allows a user to change the properties of a specified file. Using attrib, the user has the capability of changing the file to have any of the below attributes.
Read-only - allowing the file to be only viewed and not written to.
Archived - allowing Microsoft backup and other backup programs to know which files to backup.
Hidden - making the file invisible to standard users.
System - making the file an important system file.








COMMAND INFORMATION



ATRIB SYNTAX
Microsoft Windows 95, 98, and ME syntax
Displays or changes file attributes.
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [[drive:][path]filename] [/S]
+ Sets an attribute.
- Clears an attribute.
R Read-only file attribute.
A Archive file attribute.
S System file attribute.
H Hidden file attribute.
/S Processes files in all directories in the specified path.
Microsoft Windows 2000 and Windows XP syntax
Displays or changes file attributes.
ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [[drive:] [path] filename] [/S [/D]]
+ Sets an attribute.
- Clears an attribute.
R Read-only file attribute.
A Archive file attribute.
S System file attribute.
H Hidden file attribute.
/S Processes files in all directories in the specified path.
/D Process folders as well.
Microsoft Windows 2000 and Windows XP recovery console syntax
Note: The below options are the available options in the Windows recovery console.
Changes attributes on one file or directory.
ATTRIB -R | +R | -S | +S | -H | +H | -C | +C filename
+ Sets an attribute.
- Clears an attribute.
R Read-only file attribute.
S System file attribute.
H Hidden file attribute.
C Compressed file attribute.
EXAMPLES
attrib +r autoexec.bat - This would make the autoexec.bat so it cannot be modified until the read only attribute is taken off.
attrib +h config.sys - This would make the config.sys hidden so, to the average user, this file would not be existent; however, if the attrib command it typed alone, "attrib" this will show any hidden files.
attrib -h config.sys - This command will do the apposite of the above command. Instead of hiding the file it will unhide the file if hidden.
EXTENDED INFORMATION
See our File attributes computer dictionary definition for additional information about file attributes.
DOS directory file attribute bit position and Hex Value:
Bit Positions
7 6 5 4 3 2 1 0 Hex Description
0 0 0 0 0 0 0 1 01h Read Only file
0 0 0 0 0 0 1 0 02h Hidden file
0 0 0 0 0 1 0 0 04h System file
0 0 0 0 1 0 0 0 08h Volume Label
0 0 0 1 0 0 0 0 10h Subdirectory
0 0 1 0 0 0 0 0 20h Archive
0 1 0 0 0 0 0 0 40h Reserved
1 0 0 0 0 0 0 0 80h Reserved
Examples
0 0 1 0 0 0 0 1 21h Read Only, Archive
0 0 1 1 0 0 1 0 32h Hidden, Subdirectory, Archive
0 0 1 0 0 1 1 1 27h Read Only, Hidden, Archive




ABOUT MSBACKUP
A later MS-DOS application that enables users to backup their data on their computer.
The msbackup is a MS-DOS version of the new backup command and mwbackup is the Windows version of this backup program.
MS-DOS 6.0, 6.2, 6.21, and 6.22 users can still find the older backup file on the MS-DOS 6.0 and 6.22 supplemental disk.

MSBACKUP SYNTAX
MS-DOS 6.0, 6.2, 6.21, and 6.22syntax
msbackup [setup_file] [/bw] [/lcd] [/mda]
setup_file Option setup file that can be used to specify which files to backup.
/bw Run msbackup in black-and-white mode.
/lcd Run msbackup in LCD screen mode.

/mda Run msbackup in monochrome mode

EXAMPLES
msbackup
The above example would run MSBACKUP. Because this program is now a menu driven program, not many other options or switches are available for this command from the prompt.

ABOUT CHKDSK
Chkdsk is a utility which checks the computer's hard disk drives' status for any cross-linked or any additional errors with the hard disk drive.
MS-DOS versions 2.x - 4.x used chkdsk.com,
MS-DOS versions 5.x and beyond used chkdsk.exe.

SYNTAX
MS-DOS, Windows 95, Windows 98, Windows ME chkdsk syntax
Checks a disk and displays a status report.
CHKDSK [drive:][[path]filename] [/F] [/V]
[drive:][path] Specifies the drive and directory to check.
filename Specifies the file(s) to check for fragmentation.
/F Fixes errors on the disk.
/V Displays the full path and name of every file on the disk.
Type CHKDSK without parameters to check the current disk.
Windows 2000 and Windows XP chkdsk syntax
Checks a disk and displays a status report.
CHKDSK [volume[[path]filename]]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]]
volume Specifies the drive letter (followed by a colon), mount point, or volume name.
filename FAT only: Specifies the files to check for fragmentation.

/F Fixes errors on the disk.
/V On FAT/FAT32: Displays the full path and name of every file on the disk.

/R Locates bad sectors and recovers readable information (implies /F).
/L:size NTFS only: Changes the log file size to the specified number of kilobytes. If size is not specified, displays current size.
/X Forces the volume to dismount first if necessary. All opened handles to the volume would then be invalid (implies /F).
/I NTFS only: Performs a less vigorous check of index entries.
/C NTFS only: Skips checking of cycles within the folder structure.
The /I or /C switch reduces the amount of time required to run Chkdsk by skipping certain checks of the volume.
Microsoft Windows 2000 and Windows XP users who have NTFS should also consider using the CHKNTFS command.
Windows 2000 and Windows XP recovery console chkdsk syntax
Note: The below options are only available in the recovery console.
Checks a disk and displays a status report.
chkdsk [drive:] [/p] | [/r]
[drive:] Specifies the drive to check.
/p Check even if the drive is not flagged dirty, bad.
/r Locates bad sectors and recovers readable information (implies /p).
Chkdsk may be used without any parameters, in which case the current drive is checked with no switches. You can specify the listed switches.
Chkdsk requires the Autochk.exe file. Chkdsk automatically locates Autochk.exe in the startup (boot) directory. If it cannot be found in the startup directory, chkdsk attempts to locate the Windows 2000 Setup CD. If the installation CD cannot be found, chkdsk prompts for the location of Autochk.exe.
EXAMPLES
chkdsk = Will display all information described above and also report any crossed linked files.
chkdsk /f = Will fix any crossed linked files; however, do not run this command while you are in Windows95 or Windows 3.x


ABOUT DISKCOMP
Compares the contents of a floppy disk in the source drive to the contents of a floppy disk in the target drive.
This command was not included with Microsoft Windows 95, Windows 98, or Windows ME. However, if you upgraded Windows 95 from Windows 3.x, this file would still be available.

SYNTAX
Early versions of MS-DOS Syntax
DISKCOMP Source: Target: /1 /8
Source: Source drive containing one of the floppy disks to be compared.
Target: Target drive containing the other disk to be compared.
/1 Compares only the first side of the disks
/8 Compares the first 8 sectors per track.
Windows 2000 and Windows XP syntax
Compares the contents of two floppy disks.
DISKCOMP [drive1: [drive2:]]
EXAMPLES
DISKCOMP A: B: /1 - Compares the first side of A: with B:
ADDITIONAL INFORMATION
This command cannot be used with a hard disk drive and must be only used with floppies that are the identical size.
The diskcomp exit codes are:
0 - Disks are the same.
1 - Disks are different.
2 - Process aborted with CTRL + C by user.
3 - Critical error.
4 - Initialization error.


ABOUT DISKCOPY
The diskcopy utility allows a user to copy the complete contents of a diskette to another diskette.
It is not recommended that the diskcopy command be used for anything but a floppy diskette.
SYNTAX
Copies the contents of one floppy disk to another.
DISKCOPY [drive1: [drive2:]] [/1] [/V] [/M]
/1 Copies only the first side of the disk.
/V Verifies that the information is copied correctly.
/M Force multi-pass copy using memory only.
The two floppy disks must be the same type.
You may specify the same drive for drive1 and drive2.
EXAMPLES
diskcopy a: - This would make a copy of the disk that is currently in your drive.
ABOUT DOSKEY
Doskey is a MS-DOS utility that allows a user to keep a history of commands used on the computer. This allows frequently used commands to be used without having to type the commands in each time you need to use it.
SYNTAX
Edits command lines, recalls command lines, and creates macros
DOSKEY [/switch ...] [macroname=[text]]
/BUFSIZE:size Sets size of macro and command buffer (default:512)
/ECHO:on|off nables/disables echo of macro expansions (default:on)
/FILE:file Specifies file containing a list of macros
/HISTORY Displays all commands stored in memory
/INSERT Inserts new characters into line when typing
/KEYSIZE:size Sets size of keyboard type-ahead buffer (default:15)
/LINE:size Sets maximum size of line edit buffer (default:128)
/MACROS Displays all DOSKey macros
/OVERSTRIKE Overwrites new characters onto line when typing (default)
/REINSTALL Installs a new copy of DOSKey
macroname Specifies a name for a macro you create
text Specifies commands you want to assign to the macro

UP,DOWN arrows recall commands
Esc clears current command
F7 displays command history
Alt+F7 clears command history
[chars]F8 searches for command beginning with [chars]
F9 selects a command by number
Alt+F10 clears macro definitions
Below are special codes you can use in DOSKey macro definitions.
$T Command separator: allows multiple commands in a macro
$1-$9 Batch parameters: equivalent to %1-%9 in batch programs
$* Symbol replaced by everything following macro name on the command line
EXAMPLES
doskey - This would install doskey to allow you to press the up or down command to see history, or right or left to retype previous command.
TECHNICAL SUPPORT
Specifying a buffer size larger than 61900 for DOSKEY causes the computer to freeze.
DOSKEY supports approximately 61900 bytes. Due to an error in the DOSKEY program that causes DOSKEY to mark memory as unused when it terminates and stays resident, specifying a buffer size larger than this amount causes the computer to hang.
ABOUT FIND
Allows you to search for text within a file. Although MS-DOS itself is not case sensitive, when typing in the string that you are looking for with the find command, it is case sensitive.
Additionally, this command is used to find text within a file, not the actual file itself. If you are wanting to search or find a file with a particular name, use the dir command.
Users who are running Microsoft Windows 2000 or Windows XP should also consider using the improved findstr command.
SYNTAX
Searches for a text string in a file or files.
FIND [/V] [/C] [/N] [/I] "string" [[drive:][path]filename[ ...]]
/V Displays all lines NOT containing the specified string.
/C Displays only the count of lines containing the string.
/N Displays line numbers with the displayed lines.
/I Ignores the case of characters when searching for the string.
"string" Specifies the text string to find.
[drive:][path]filename Specifies a file or files to search.
If a pathname is not specified, FIND searches the text typed at the prompt or piped from another command.
EXAMPLES
find /c "REM" c:\autoexec.bat = This would find any "REM" statement in the autoexec.bat.
find "hope" *.txt = This would search for any text file (.txt) that contains the text hope in the current directory. Below is an example of the output you may see. As can be seen from the below example the only file that contains hope is the CH.TXT file.
---------- ACTIVE SETUP LOG.TXT

---------- CH.TXT
computer hope

---------- MODEMDET.TXT

---------- OEWABLOG.TXT

---------- SCHEDLGU.TXT

---------- SETUPLOG.TXT





ABOUT HELP
Help is used to access the information and help file from a MS-DOS prompt.
MS-DOS 5.x uses help.exe.
MS-DOS 6.x uses help.com.
Microsoft Windows 2000 uses help.exe
Microsoft Windows XP uses help.exe
For quick reference help with MS-DOS commands in any of the versions of MS-DOS or Windows, you can also use the -help or /? after a command; for example:
dir -help
or
dir /?
SYNTAX
Microsoft Windows 95, 98, ME syntax
Starts MS-DOS Help on MS-DOS commands.
HELP [/B] [/G] [/H] [/NOHI] [topic]
/B Allows use of a monochrome monitor with a color graphics card.
/G Provides the fastest update of a CGA screen.
/H Displays the maximum number of lines possible for your hardware.
/NOHI Allows the use of a monitor without high-intensity support.
[topic] Specifies the help topic to view.
Microsoft Windows 2000 and Windows XP syntax
Provides help information for Windows 2000 commands.
HELP [command]
command - displays help information on that command.
Microsoft Windows 2000 and Windows XP recovery console syntax
Displays information about commands supported by the Recovery Console.
help [command]
command Any Recovery Console command.
If command is not specified, all of the commands supported by the Recovery Console are listed. The command parameter is used to see the help for a specific command.
EXAMPLES
help - Displays the available commands for which help is capable of displaying help. Typing "help command", where command is the command name for which you wish to display help, is the same as typing "command /?".
ABOUT LABEL
Label is used to view or change the label of the computer disk drives.
SYNTAX
Creates, changes, or deletes the volume label of a disk.
LABEL [drive:][label]
EXAMPLES
label a: mydisk - This would label the disk currently in the drive to "mydisk", but will not label if your disk is write protected.
POSSIBLE ISSUES
If your hard disk label contains ASCII or other extended characters and you are running MS-DOS 6.0 or lower if you run scandisk data or the entire hard disk drive can become corrupt.
Because scandisk is looking for corrupt or incorrect data, it is possible if the label has ASCII or any unrecognized characters that it will attempt to fix it. If scandisk attempts to fix your label it may remove all information and place it into a CHK file.
If hard drive has unrecognizable characters, unable to delete partition using fdisk.
Use label to recreate the label and then use fdisk to delete the partition after label created.
ABOUT MEM
Allows you to determine the available, used and free memory.
SYNTAX
Displays the amount of used and free memory in your system.
MEM [/CLASSIFY | /DEBUG | /FREE | /MODULE module name] [/PAGE]
/CLASSIFY or /C Classifies programs by memory usage. Lists the size of programs, provides a summary of memory in use, and lists largest memory block available.
/DEBUG or /D Displays status of all modules in memory, internal drivers, and other information.
/FREE or /F Displays information about the amount of free memory left in both conventional and upper memory.
/MODULE or /M Displays a detailed listing of a module's memory use. This option must be followed by the name of a module, optionally separated from /M by a colon.
/PAGE or /P Pauses after each screen full of information.
EXAMPLES
mem - This would display information about your memory as seen in the below examples.
Microsoft Windows 95 and Windows 98 example
Memory Type Total Used Free
--------------- ------ ------ -----
Conventional 640k 52k 588k
Upper 0k 0k 0k
Reserved 384k 384k 0k
Extended (XMS) 31,744k 168k 31,576k
--------------- ------ ------ ------
Total memory 31,768k 168k 31,576k

Total under 1 MB 640k 52k 588k
Total Expanded (EMS) 32M (33,046,528 bytes)
Free Expanded (EMS) 16M (16,777,216 bytes)
Largest executable program size 588K (602,512 bytes)
Largest free upper memory block 0K (0 bytes)
MS-DOS is resident in the high memory area.
Windows 2000 and Windows XP example
655360 bytes total conventional memory
655360 bytes available to MS-DOS
633872 largest executable program size

1048576 bytes total contiguous extended memory
0 bytes available contiguous extended memory
941056 bytes available XMS memory
MS-DOS resident in High Memory Area
mem /f - This would display the amount of conventional memory free.
ISSUES
When using the mem /c command from a DOS window in Windows, the user will have no upper blocks as illustrated in the above example. This is caused because Windows reserves all global upper memory blocks for Windows itself.
MS-DOS 6.2 and above will not accept or recognize more than 64 megs of ram when typing mem.
ABOUT PRINT
Print was first introduced in MS-DOS 2.0 as PRINT.COM and later was changed to PRINT.EXE in MS-DOS 5.0 and above. This command allowed users to print a text file to a line printer, in the background.
Users using Windows 95 or above see document CH000199 for how the dir command can be used to print directories / files.
SYNTAX
print /d:device /b:size /u:ticks1 /m:ticks2
/s:ticks3 /q:size /t
drive:\path\ filename /c /p

Options:
/d:device Name of printer device
Printer Ports: LPT1, LPT2 orLPT3
Serial Ports: Com1, Com2, Com3 or Com4
/b:size Sets size (in bytes) of internal buffer. Default=512 with range of 512 to 16384.
/u:ticks1 Maximum number of clock ticks PRINT is to wait for a printer to become available. Default=1 with a range of 1 to 255.
/m:ticks2 Maximum number of clock ticks PRINT can take to print a character or printer. Default=2 with a range of 1 to 255.
/s:ticks3 Maximum number of clock ticks allocated for background printing. Default=8 with range of 1 to 255.
/q:qsize Maximum number of files allowed in print queue. Default=10 with range of 1 to 255.
/t Removes files from the print queue.
drive:\path\ filename Location and filename of file to be printed.
/c Removes files from the print queue.
/p Adds files to the print queue.
EXAMPLES
print c:\file.txt /c /d:lpt1 - Prints the file file.txt to the parallel port lpt1.
ADDITIONAL INFORMATION
The print command is only able to print ASCII text.
The /d, /b, /u, /m, /s and /q switches can only be used once. If a different value needs to be used the computer must be restarted.
INTRODUCTION
Scandisk is a Microsoft utility that was purchased originally from Norton which is now Symantec. Scandisk is designed to check the integrity of a computer hard disk drive to verify that there are no significant issues which could cause issues with your computer data.
MS-DOS SCANDISK
Scandisk was first available in MS-DOS 6.2 and was available ever since. If you are running MS-DOS 6.2 or 6.22 and would like to run scandisk, follow the below steps.
• If you are in Windows 3.x, click File and then Exit to get to the MS-DOS prompt.
• From MS-DOS, type CD\DOS and press enter.
• From the C:\DOS> type scandisk and press enter which should begin running scandisk on the computer.
Finally, some computer manufacturers have changed the installation directory of where scandisk is located; if you are unable to run scandisk from the DOS directory, go to the WINDOWS directory by typing CD\WINDOWS.
MS-DOS 6.2 and below Scandisk switches can be found on our below section under MS-DOS troubleshooting.
WINDOWS 3.X SCANDISK
If you are running Windows 3.x and MS-DOS 6.2 or above please refer to the MS-DOS scandisk section for information on how to run scandisk.
WINDOWS 95/98 SCANDISK
Windows 95 improved the functionality of scandisk, as did Windows 98; to run scandisk from Windows, follow the below steps.
• Click Start
• Click Run and type scandisk in the run box
• Click ok
• Within the scandisk window select the drive that you wish to be checked.
• Choose the option between standard and through. It is recommended you run standard first, if you encounter issues with scandisk then run the through scan.
• Finally, click start to begin scandisk.
In addition, Windows 95 OSR2 and Windows 98 will run scandisk automatically if the computer is shutdown improperly to check to see if the hard disk drive encountered issues when the computer was improperly shutdown.



WINDOWS ME SCANDISK
Like Windows 95 and Windows 98 Windows me has scandisk located in the same location, to run Scandisk in Windows ME follow the below instructions.
• Click Start
• Click Run and type scandisk in the run box
• Click ok
• Within the scandisk window select the drive that you wish to be checked.
• Choose the option between standard and through. It is recommended you run standard first, if you encounter issues with scandisk then run the through scan.
• Finally click start to begin scandisk.
WINDOWS NT SCANDISK
Windows NT is not shipped with Microsoft Scandisk. However, various third-party companies offer utilities that can scandisk and check your hard disk drive for you. Symantec a well respected computer company offers such a program.
WINDOWS 2000 / XP SCANDISK
Keep in mind that if Windows 2000 and XP is a networking operating system and it's possible that the privileges to run scandisk may have revoked by the system administrator. To run Scandisk we recommend you follow the recommend steps.
• Double-click My Computer
• Highlight a local hard disk drive by clicking on it once.
• Right click the highlighted local drive
• Click properties
• Click the tools tab and click check now to check the drive for errors.
• The computer will need to restart in order to run scandisk in a safe mode.


INDEX





Category:
Software

Companies:
Microsoft

Related Pages:
Defrag
MS-DOS
Windows 3.x
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP



UPDATES





No Specific software updates for this topic.
See Download Page for complete listing of available software.


RESOLVED





Were you able to locate the answer to your questions?
• Yes
• No





MS-DOS SCANDISK SYNTAX
Below is a listing of available switches in MS-DOS scandisk 6.2 and above. It is important to note that these commands will not work in Windows 95 and above.
scandisk [ drive: | /all] [/checkonly | /autofix [/nosave] | /custom] [/fragment] [/surface] [/mono] [/nosave] [/nosummary]
/all - Checks and repairs all local drives at once.
/checkonly - Checks drive for errors but will not make repairs.
/autofix - Fixes errors without asking you first. Saves lost clusters by default as files in the drive's root directory. Cannot be used with /checkonly or /custom.
/custom - Runs Scandisk using the settings in [custom] section of the scandisk.ini file. Cannot be used with /autofix or /checkonly.
/surface - Automatically checks surface after other areas are tested without prompting you first. When used with /custom, will override any /surface setting in [Custom] section of scandisk.ini.
/fragment - Checks individual files for fragmentation. Must specify a drive, path and file name; cannot use any other switches.
/mono - Uses a monochrome display instead of color.
/nosave - Deletes all lost clusters found by Scandisk. Can be used with /autofix.
/nosummary - Prevents display of full-screen summary after each drive. Use with /autofix to prevent prompts for undo diskette.




ABOUT SCANREG
Scanreg was first introduced by Microsoft in Microsoft Windows 98 and has become a very useful and helpful utility. Using Scanreg a user can backup his or her registry manually and or allow Windows to backup the registry daily (default).
SCANREG SYNTAX
Usage: SCANREG [/

No comments: