undocumented DOS commands

just an old but interesting file I’ve found on the-eye.eu

Shhh! The Undocumented DOS Commands
===================================

Version 1.06
Copyright (C) 1995, 1996, 1997, 1998, 1999 by Kevtronics
Portions are featured in the November 1996 issue of DOS World Magazine.
Last updated on Friday, January 1, 1999.

Available on the World Wide Web at:
http://ourworld.compuserve.com/homepages/kevtronics/undoc.txt

If you're looking at this from my Web site, you may be asking, "why is this
still in text-file format?" Well, I still like to upload this list to
CompuServe and Usenet so I choose to keep it in plain ASCII text format
instead of embellishing it with HTML features. So please excuse the bland
appearance while you enjoy the following details on the dozens of DOS
commands Microsoft and IBM don't want you to know about!

These commands may or may not work with your version or brand of DOS.
Most of them reqire DOS 4.0 or higher but some may work with earlier
versions.

Note: "MS-DOS 7.x" refers to both the MS-DOS 7.0 that comes with Windows 95
and the MS-DOS 7.1 that comes with Windows 95 OEM Service Release 2.
Windows 98 includes a slightly updated version of MS-DOS 7.1, which may be
called MS-DOS 8.0 (I don't have a Windows 98 package available to find out).
If and when I do obtain Windows 98 (surely not by donating $90 to Mustapha
Gates), I will list any additional undocumented DOS commands it contains.

Gossip: There are rumors that Microsoft has produced a special version of
MS-DOS for the U.S. goverment and military, called MS-DOS 6.23. U.S. armed
forces members have reported seeing original installation disks for MS-DOS
6.23 and claim that they use MS-DOS 6.23 on their computers. I'm not sure
what the differences between MS-DOS 6.22 and 6.23 are. If anyone knows,
please let me know.

Command                 Description
----------------------  --------------------------------------------------

;                       (CONFIG.SYS only) A short-cut for the REM
			command.

::                      (Batch files only) Another short-cut for the REM
			command, but faster (DOS just skips over any ::
			lines rather than processing them).

ANSI.SYS /L             (CONFIG.SYS only) /SCREENSIZE={number} or
         /S             /S={number} sets the maximum number of lines to
         /SCREENSIZE    reserve for a screen buffer. Default is /S=25 --
                        use /S=43 or /S=50 to support full use of EGA/VGA
                        43/50-line screens. Or use /S=1 to save memory
                        when the screen save/recall function is not used.
                        Anyone know what /L does?

ATTRIB,                 (ATTRIB followed by a comma) Same effect as
			ATTRIB -A -H -R -S *.* (removes attributes of all 
			files in the current directory).

AVAILDEV                (CONFIG.SYS only) Only in DOS 2.x; see end of file
                        for detailed information.

BACKUP /HD              When auto-formatting a disk for backup use, /HD
                        causes the disk to always be formatted to high
                        density (1.2 or 1.44 Mb).

CHKDSK /!               According to IBM, /! is a goof-up in the code of
                        CHKDSK. When used, it does not affect the
                        operation of CHKDSK in any way. Only in IBM's PC DOS
                        7.0 and possibly PC DOS 2000.

COMMAND /F              Automatically (F)ails floppy disk drive errors.
			Works either at the DOS prompt or in your
                        SHELL=COMMAND.COM... line in CONFIG.SYS. Requires
                        DOS 3.3 or higher.

COMMAND /D              Undoes the /F switch temorarily. Type EXIT to
			return to the auto-fail version of DOS. Use at
                        the DOS prompt or in batch files only. Requires
                        DOS 5.0 or higher.

COMMAND /T              (Only in MS-DOS 7.x, the DOS that comes with
        /Z              Windows 95 and 98.) Undocumented switches for
                        COMMAND.

COMMENT comment_ID      (CONFIG.SYS only) Allows you to put comments onto
			the end of CONFIG.SYS commands. For example,
                        COMMENT ;  lets you use:
                        DOS=HIGH       ; Loads DOS into high memory
			Requires DOS 4.0 or higher.

CPSW                    (CONFIG.SYS only) Only in DOS 4.0x; turns on
			(CPSW=ON) or off (CPSW=OFF) code page switching.

DIR,                    (DIR followed by a comma) Displays ALL files in 
			the current directory, including hidden and
                        system files. Does not work in MS-DOS 7.x, the DOS
                        that comes with Windows 95 and 98.

DOSKEY /APPEDIT         (As far as I can tell, only in MS-DOS 7.x, the
       /COMMAND         DOS that comes with Windows 95 and 98.) Some
       /PERMANENT       undocumented switches for DOSKEY. Anybody know
       /SCRSIZE         what they do?
       /XHISTORY

DRIVPARM                (CONFIG.SYS only) Documented in DOS 4.0 through
                        6.x; undocumented in DOS 3.2, 3.3, PC DOS 7, and
                        PC DOS 2000. Works fine in MS-DOS 3.2/3.3 and PC
                        DOS 7.0/2000, but requires special handling in PC
                        DOS 3.2 or 3.3; see end of file.

FDISK /MBR              Re-writes the hard disk drive's Master Boot
			Record. Useful if you hard disk drive just won't
			boot up properly after you format it or after
			you suffered from a MBR-corrupting virus.
			Requires DOS 5.0 or higher.

FDISK /PRI              Other undocumented FDISK switches. /STATUS is
      /EXT              documented in DOS 6.0 and higher. /Q and /STATUS
      /LOG              require DOS 5.0 or higher. /STATUS shows the
      /Q                current status of your disk drive partitions.
      /STATUS
      /X

FORMAT /AUTOTEST        No-questions-asked format; just formats then
			exits. No prompt for volume label and no disk
			information is displayed. Requires DOS 4.0 or
			higher.

FORMAT /BACKUP          Like /AUTOTEST except asks for volume label and
			displays disk information (free space, etc.).
			Requires DOS 4.0 or higher.

FORMAT /SELECT          Removes the format from a formatted disk; press Y
			then Enter at the pause. No messages displayed.
                        DOS 4.0x's Setup program used this switch to
                        remove a 12-bit FAT format from a hard disk before
                        reformatting it with a 16-bit FAT, which allowed
                        use of hard drives bigger than 32 Mb. Requires DOS
                        4.0 or higher.

FORMAT /U               Suspiciously not documented in MS-DOS 7.x, the DOS
                        that comes with Windows 95 and 98.

IFS                     (CONFIG.SYS only) Only in DOS 4.0x. Loads
                        Installable File System drivers. Uses the same
                        format as DEVICE (IFS=C:\DOS\IFSDRVR.SYS etc.).

INSTALLHIGH             (CONFIG.SYS only) Works the same as INSTALL
			except loads the program into upper memory.
			Requires DOS 6.0 or higher.

LH                      In DOS 5.0 or higher, LH is not documented in
			the /? help as an abbreviation for LOADHIGH but
			it works fine.

MULTITRACK              (CONFIG.SYS only) The default is MULTITRACK=ON,
			and MULTITRACK=OFF solves compatibilty problems
			with antique hard disk drives. Requires DOS 4.0
			or higher. See end of file for more information.

QBASIC /EDCOM           In DOS 5.0 or higher, this is the undocumeneted
                        QBASIC switch EDIT.COM uses to start the Editor.
                        /EDCOM *must* be typed in all capitals. /EDCOM
                        may be combined with /? to provide help on the
                        Editor's options.

QBASIC /QBHELP          In MS-DOS 6.0 or higher, this is the undocumented
                        QBASIC switch HELP.COM uses to start MS-DOS Help.

RESTORE /Y              Some undocumented switches for the RESTORE
        /Z              command. Anybody know what they do?

SCANDISK /CLIP        - Only in MS-DOS 7.x. Shortens long file names to
                        regular 8.3 format. (?)
         /HELP        - Same as /?. Works with MS-DOS 6.x and 7.x.
         /MOUNT       - Mounts DriveSpace volume. Same as using
                        "Mount=Always" in SCANDISK.INI Only in MS-DOS 7.x.
         /NEW         - ??? Only in MS-DOS 7.x.
         /NOLOST      - No prompt for surface scan, no check for lost
                        clusters. Only in MS-DOS 7.x.
         /NOUI        - Only in MS-DOS 7.x. Uses normal DOS interface
                        instead of Windows 95 graphical interface.
         /TEXT        - Only in MS-DOS 7.x. Same as /NOUI. (?)
         /TIME        - Works with MS-DOS 6.x and 7.x. During surface
                        scan, marks sectors that take longer than usual
                        to read. These sectors may be on their way to
                        failing totally. Same as using "ScanTimeOut=On"
                        in SCANDISK.INI.

SET NO_SEP=1            Removes the commas from numbers in DOS 6.2 and
			higher. Type SET NO_SEP= (nothing after the =)
			to turn commas back on. Documented in PC DOS 6.3
                        and higher but undocumented in MS-DOS 6.2 and
                        higher.

SHARE /NC               No Count -- When a program asks how many sharing
                        locks are left, it always responds with whatever
                        the maximum is, no matter how many locks actually
                        are in use.

SWITCHAR                (CONFIG.SYS only) Only in DOS 2.x. Lets you change
                        the switch character (usually "/") to some other
                        character using SWITCHAR=x. See end of file for more
                        information.

SWITCHES /K             Undocumented in DOS 4.0x; documented in DOS 5.0
			and higher. Turns off support for 101-key
                        "enhanced" keyboards to make old programs happy.

TRUENAME filename.ext   Displays the true, complete path of the file name
                        specified. Ignores ASSIGN, JOIN, or SUBST re-
			assignments. If no file name is specified,
                        displays the current complete path. When used on a
                        network or CD-ROM drive or file, TRUENAME responds
                        in the following format:

                        //server/volume/dir/dir/file.ext

                        Interestingly, the /? switch works with TRUENAME
                        in PC DOS 7 (only), but it's not listed in the on-
                        line help system. Requires DOS 4.0 or higher.

VER /R                  In MS-DOS 5.0 or higher, displays the DOS
			revision number and where DOS is loaded (low
			memory, HMA, or ROM). In PC DOS 5.0 or higher,
			displays where DOS is loaded (the DOS revision
			number is always displayed in PC DOS).

XCOPY /Y                Not documented in MS-DOS 7.x, the DOS that
      /-Y               comes with Windows 95 and 98. /Y gets rid of
                        overwrite prompts, /-Y causes them if COPYCMD=/Y.

Additional information about AVAILDEV, DRIVPARM, MULTITRACK, and
SWITCHAR:

AVAILDEV
Syntax: AVAILDEV=TRUE  or  AVAILDEV=FALSE
Default: AVAILDEV=TRUE

This commmand controls the access to devices. Usually devices are
accessed by name (e.g. CON or LPT1). This behavior might be undesirable
however if the user decides to use a device name as file name. AVAILDEV
has been removed from DOS version 3.0 and higher so that there is no
ambiguity when accessing a network. If CONFIG.SYS contains the command
AVAILDEV=FALSE, the access to devices is only available using a
non-existent file in the non-existent directory \DEV. For example, the
device COM1 could be accessed as \DEV\COM1.

DRIVPARM
In PC DOS 3.2 and 3.3

When using PC DOS 3.2 or 3.3, DRIVPARM is undocumented but it can be
made to work using this trick. In CONFIG.SYS, type:

	       Normal DOS 4.0+ DRIVPARM set-up switches.
		   \/
DRIVPARM ^A^A^A {switches}
	   /\
       Type Ctrl-A, not Shift-6 A. In MS-DOS's Edit, type Ctrl-P
       then Ctrl-A (you will see a smiley face on the screen).

MULTITRACK
Syntax: MULTITRACK=ON  or  MULTITRACK=OFF
Default: MULTITRACK=ON

Starting with DOS 4.0, disk accesses have been optimized to get better
performance when working with "newer" hard disk drives. Among other
things, reading and writing of more than one track with a single BIOS
call has been implemented. But some problems have been obeserved with
hard disk drives of some manufacturers. So the MULTITRACK=OFF option
limits disk access to a single track.

SWITCHAR
Syntax: SWITCHAR=char
Default: SWITCHAR=/

Until DOS 3.0 you could select the character that has to precede each
switch. You could use the UNIX-style command syntax when using "-" as
the switch character instead of "/". There is a DOS system function
(Int 21h, function 37h, subfunctions 0 and 1), undocumented until DOS
3.0, to get or set this switch character. Not all commands in all DOS
versions did actually support this feature. That the reason for the
removal of this option is the growing use of network software, where a
selectable switch character would cause problems.
_ _ _

If you find any other undocumented commands, or if you have any
additional information on the commands listed above, please tell me!
Send e-mail to:

  Kevtronics
  76362.2023@compuserve.com

This entry was posted in misc, Retro Computing and tagged . Bookmark the permalink.