📄 bat.def
字号:
Rem /B:size
Rem Sets the size (in bytes) of the internal buffer, which is used to store
Rem data before it is sent to the printer. The minimum and default value for
Rem size is 512; the maximum value is 16384. Increasing this value decreases
Rem the amount of memory available for other purposes but may speed up the
Rem PRINT command.
Rem /U:ticks1
Rem Specifies the maximum number of clock ticks PRINT is to wait for a
Rem printer to be available (clock ticks occur about 18 times per second).
Rem If the printer is not available within the time specified, the job does
Rem not print. Values for ticks1 must be in the range 1 through 255. The
Rem default value is 1.
Rem /M:ticks2
Rem Specifies the maximum number of clock ticks PRINT can take to print a
Rem character on the printer. Values for ticks2 must be in the range 1
Rem through 255. The default value is 2. If a character is printed too
Rem slowly, MS-DOS displays an error message.
Rem /S:ticks3
Rem Specifies the number of clock ticks the MS-DOS scheduler allocates for
Rem background printing. Values for ticks3 must be in the range 1 through
Rem 255. The default value is 8. Increasing this value can speed up printing
Rem while slowing down other programs.
Rem /Q:qsize
Rem Specifies the maximum number of files allowed in the print queue. Values
Rem for qsize must be in the range 4 through 32. The default value is 10.
Rem /T Removes all files from the print queue.
Rem /C Removes files from the print queue. You can use the /C and /P switches
Rem on the same command line.
Rem /P Adds files to the print queue.
[PROMPT | Changes the DOS command prompt]
PROMPT |[prompt text] [options]
[PROMPT1 |d Changes the DOS command prompt]
PROMPT |[prompt text] [options]
Rem Changes the DOS command prompt.
Rem Options:
Rem "$Q" = (equal sign)
Rem "$$" $ (dollar sign)
Rem "$T" Current time
Rem "$D" Current date
Rem "$P" Current drive and path
Rem "$V" MS-DOS version number
Rem "$N" Current drive
Rem "$G" Rem (greater-than sign)
Rem "$L" < (less-than sign)
Rem "$B" | (pipe)
Rem '$_' ENTER-LINEFEED
Rem "$E" ASCII escape code (code 27)
Rem "$H" Backspace (to delete a character that has been written to the
Rem prompt command line)
[RECOVER | Resolves sector problems on a file or a disk]
RECOVER |[d:][path]filename
RECOVER d:
[REM | Comment in batch file]
Rem |
[RENAME | Changes the filename(s))]
RENAME |(REN) [d:][path]filename [d:][path]filename
[REPLACE | Replaces stored file(s)]
REPLACE |[d:][path]filename [d:][path] [/A][/P][/R][/S][/U][/W]
[REPLACE1 |d Replaces stored file(s)]
REPLACE |[d:][path]filename [d:][path] [/A][/P][/R][/S][/U][/W]
Rem Replaces stored files with files of the same name from a different
Rem storage location.
Rem /A Adds new files to the destination directory instead of replacing
Rem existing files. You cannot use this switch with the /S or /U switch.
Rem /P Prompts you for confirmation before replacing a destination file or
Rem adding a source file.
Rem /R Replaces read-only files as well as unprotected files. If you do not
Rem specify this switch but attempt to replace a read-only file, an error
Rem results and stops the replacement operation.
Rem /S Searches all subdirectories of the destination directory and replaces
Rem matching files. You cannot use the /S switch with the /A switch. The
Rem REPLACE command does not search subdirectories specified in path1.
Rem /W Waits for you to insert a disk before REPLACE begins to search for
Rem source files. If you do not specify /W, REPLACE begins replacing or
Rem adding files immediately after you press ENTER.
Rem /U Replaces (updates) only those files on the destination directory that
Rem are older than those in the source directory. You cannot use the /U
Rem switch with the /A switch.
[RESTORE | Restores files from Backup]
RESTORE |d: [d:][path]filename [/P][/S][/B:mm-dd-yy] [/A:mm-dd-yy][/E:hh:mm:ss] [/L:hh:mm:ss] [/M][/N][/D]
[RD (RMDIR)| Removes a subdirectory]
RD |[d:]path
[SCANDISK | Disk analysis and repair tool]
SCANDISK |[d: [d: . . .]|/all][/checkonly|/autofix[/nosave]|/custom][/surface][/mono][/nosummay]
[SCANDISK1 |d Disk analysis and repair tool]
SCANDISK |[d: [d: . . .]|/all][/checkonly|/autofix[/nosave]|/custom][/surface][/mono][/nosummay]
SCANDISK volume-name[/checkonly|/autofix[/nosave]|/custom][/mono][/nosummary]
SCANDISK /fragment [d:][path]filename
SCANDISK /undo [undo-d:][/mono]
Rem Starts the Microsoft ScanDisk program which is a disk analysis and
Rem repair tool used to check a drive for errors and correct
Rem any problems that it finds.
[SELECT | Formats a disk and installs country-specific information]
SELECT |[d:] [d:][path] [country code][keyboard code]
Rem Formats a disk and installs country-specific information and keyboard codes
Rem (starting with DOS Version 6, this command is no longer available).
[SET | Sets system variable]
SET |(string1)=[string2]
[SETVER | Sets the version table for programs]
SETVER |[d:]:path][filename (number)][/delete][/quiet]
[SHARE | Installs support for file sharing and locking]
SHARE |[/F:space] [/L:locks]
[SHELL | Specify the command interpreter]
SHELL=|[d:][path]filename [parameters]
[SHIFT | Increases number of replaceable parameters]
SHIFT|
[SORT | Sorts input and sends it to the screen]
SORT |[/R][/+n][drive1:][path1]filename1 [Rem [drive2:][path2]filename2]
[SORT1 |d Sorts input and sends it to the screen]
SORT |[/R][/+n][drive1:][path1]filename1 [Rem [drive2:][path2]filename2]
Rem Sorts input and sends it to the screen or to a file.
Rem /R Reverses the order of the sorting operation; that is, sorts from Z to A,
Rem and then from 9 to 0.
Rem /+n Sorts the file according to the character in column n. If you do not use
Rem this switch, the SORT command sorts data according to the characters in
Rem column 1.
[STACKS | Set the number of stack frames]
STACKS=|(number),(size)
[SUBMENU | Create a multilevel menu]
SUBMENU=|blockname, [menutext]
[SUBST | Creates virtual drive from directory]
SUBST |d: d:path
SUBST d: /D
[SWITCHES | Configure DOS in a special way]
SWITCHES=|[/K][/F][/N][/W]
[SWITCHES1 |d Configure DOS in a special way]
SWITCHES=|[/K][/F][/N][/W]
Rem Used in the CONFIG.SYS file to configure DOS in a special way;
Rem for example, to tell DOS to emulate different hardware configurations.
Rem /F Skips the 2-second delay after displaying the "Starting MS-DOS ..."
Rem message during startup.
Rem /K Forces an enhanced keyboard to behave like a conventional keyboard.
Rem /N Prevents you from using the F5 or F8 key to bypass startup commands.
Rem /W Specifies that the WINA20.386 file has been moved to a directory other
Rem than the root directory.
[SYS | Transfers the system files to another disk]
SYS |[source] d:
[TIME | Displays or sets current time]
TIME |hh:mm[:ss][.cc][A|P]
[TREE | Displays directory tree]
TREE |[d:][path] [/A][/F]
Rem Displays directory paths and (optionally) files in each subdirectory.
Rem /F Displays the names of the files in each directory.
Rem /A Specifies that TREE is to use text characters instead of graphic
Rem characters to show the lines linking subdirectories.
[TYPE | Displays the contents of a file]
TYPE |[d:][path]filename
[UNDELETE | Restores deleted files]
UNDELETE |[d:][path][filename] [/DT|/DS|/DOS]
[UNDELETE1 |d Restores deleted files]
UNDELETE |[d:][path][filename] [/DT|/DS|/DOS]
UNDELETE [/list|/all|/purge[d:]|/status|/load|/U|/S[d:]|/Td:[-entries]]
Rem Restores files deleted with the DELETE command.
Rem /LIST
Rem Only lists the deleted files that are available to be recovered
Rem /ALL
Rem Recovers deleted files without prompting for confirmation on each file.
Rem /DOS
Rem Recovers only those files that are internally listed as deleted by
Rem MS-DOS, prompting for confirmation on each file.
Rem /DT Recovers only those files listed in the deletion-tracking file,
Rem prompting for confirmation on each file.
Rem /DS Recovers only those files listed in the SENTRY directory, prompting for
Rem confirmation on each file.
Rem /LOAD
Rem Loads the Undelete memory-resident program into memory using information
Rem defined in the UNDELETE.INI file. If the UNDELETE.INI file does not
Rem exist, UNDELETE uses default values.
Rem /UNLOAD
Rem Unloads the memory-resident portion of the Undelete program from memory,
Rem turning off the capability to restore deleted files.
Rem /PURGE[drive]
Rem Deletes the contents of the SENTRY directory. If no drive is specified,
Rem UNDELETE searches the current drive for the directory.
Rem /STATUS
Rem Displays the type of delete protection in effect for each drive.
Rem /S[drive]
Rem Enables the Delete Sentry level of protection and loads the
Rem memory-resident portion of the UNDELETE program. The program records
Rem information used to recover deleted files on the specified drive. If you
Rem do not specify a drive, using this switch enables the Delete Sentry
Rem level of protection on the current drive. Specifying the /S switch loads
Rem the memory-resident program into memory using the information defined in
Rem the UNDELETE.INI file.
Rem /Tdrive[-entries]
Rem Enables the Delete Tracker level of protection and loads the
Rem memory-resident portion of the UNDELETE program. The program records
Rem information used to recover deleted files. The optional entries parameter,
Rem which must be a value in the range 1 through 999, specifies the maximum
Rem number of entries in the deletion-tracking file (PCTRACKR.DEL).
[UNFORMAT | Undo the disk formatting]
UNFORMAT |d: [/J][/L][/test][/partn][/P][/U]
[UNFORMAT1 |d Undo the disk formatting]
UNFORMAT |d: [/J][/L][/test][/partn][/P][/U]
Rem Used to undo the effects of formatting a disk.
Rem /L Lists every file and subdirectory found by UNFORMAT. If you do not
Rem specify this switch, UNFORMAT lists only subdirectories and files that
Rem are fragmented. To suspend scrolling of the displayed list, press
Rem CTRL+S; to resume scrolling, press any key.
Rem /TEST
Rem Shows how UNFORMAT would recreate the information on the disk, but does
Rem not actually unformat the disk.
Rem /P Sends output messages to the printer connected to LPT1.
[VER | Displays the DOS version number]
VER
[VERIFY | Turns on the verify mode after copy]
VERIFY |on|off
[VOL | Displays a disk's volume label]
VOL |[d:]
[VSAFE | Memory-resident antivirus]
VSAFE |[/option[+|-]...] [/NE][/NX][Ax|/Cx] [/N][/D][/U]
[XCOPY | Copies directories, subdirectories, and files]
XCOPY |[d:][path]filename [d:][path][filename] [/A][/D:(date)] [/E][/M][/P][/S][/V][/W][Y\-Y]
[XCOPY1 |d Copies directories, subdirectories, and files]
XCOPY |[d:][path]filename [d:][path][filename] [/A][/D:(date)] [/E][/M][/P][/S][/V][/W][Y\-Y]
Rem Copies directories, subdirectories, and files.
Rem /Y Indicates that you want XCOPY to replace existing file(s) without
Rem prompting you for confirmation.
Rem /-Y Indicates that you want XCOPY to prompt you for confirmation when
Rem replacing an existing file.
Rem /A Copies only source files that have their archive file attributes set.
Rem This switch does not modify the archive file attribute of the source
Rem file.
Rem /M Copies source files that have their archive file attributes set. Unlike
Rem the /A switch, the /M switch turns off archive file attributes in the
Rem files specified in source.
Rem /D:date
Rem Copies only source files modified on or after the specified date.
Rem /P Prompts you to confirm whether you want to create destination file.
Rem /S Copies directories and subdirectories, unless they are empty. If you
Rem omit this switch, XCOPY works within a single directory.
Rem /E Copies any subdirectories, even if they are empty.
Rem /V Verifies each file as it is written to the destination file to make sure
Rem that the destination files are identical to the source files.
Rem /W Displays the following message and waits for your response before
Rem starting to copy files.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -