DOS language Daquan 1

Source: Internet
Author: User

 

Doscommand

Index of Common commands in DOS

▲Dir

▲Attrib

▲Cd

▲Copy

▲Xcopy

▲Del

▲Undelete

▲Deltree

▲Dos = high

▲Doskey

▲Emm386.exe

▲Fc

▲Format

▲Unformat

▲Interlnk

▲Intersvr

▲Memmaker

▲Memitem

▲Mscdex

▲Msd

▲Prompt

▲Ramdrive

▲Subst

▲Mem

▲"> <"Tool

▲Move

▲Append

▲Call

▲Defrag

▲Device

 

 

I. dir command format:

Dir [D:] [path] [name] [[/A] [: attrib] [/O: [sorted] [/S] [/B] [/L] [/C [H]

(1) DIR/A: attrib contains all files by default (system files. hidden files)

Attrib [:] [H/-H] Only displays hidden or non-hidden files.

[R/-R] Only displays read-only or non-read-only files

[S/-S] Only displays system files or non-system files

[A/-A] Only displays files to be archived or non-Archive

(2)/o [:] sorted: by default, all sub-directories are displayed in alphabetical order before the file.

/O [N/-N]: displayed alphabetically or in reverse order by file name

[E/-E]: Display in alphabetical or reverse order of the extension.

[D/-D]: Display in chronological or reverse order

[S/-S]: displays data in the descending order of size or in reverse order.

[G/-G]: The Sub-directory is prior to the file or the file is prior to the sub-directory

(3)/S parameter: list all files in the current directory and Its subdirectories

Column name: Dir/S/A/O: n C:/> prn

Print and output all subdirectories and files on drive C according to their affiliation and in alphabetical order.

(4)/B parameter: only the file name and extension are displayed.

(5)/L parameters: list all files or subdirectories with lowercase letters

Training:

All files (including implicit and system files) in the current directory of DIR/)

DIR/AH implicit file (including sub-directories (hidden) DIR/a-h

DIR/as Column System File DIR/A-S

DIR/Ad sub-directory DIR/a-d

DIR/O in alphabetical order

DIR/B only displays file names and extensions

 

 

Ii. attrib [+ R |-R] [+ A |-A] [+ S |-S] [+ H |-H] [D:] [name] [/S]

Default attrib name: displays the (File) attributes of a file.

Attrib Io. sys (or sub-directory)

Shr c:/IO. sys is specified as a system (s) Implicit (h) read-only (r) file.

You can also attrib *. sys to display the file attributes with the extension sys.

The parameter [+ R |-R] sets or removes the read-only attribute of the file.

[+ A |-A] set or unarchive file Properties

[+ H |-H] sets or removes implicit attributes of a file, especially for subdirectories)

The/S parameter takes effect for all files in the current and current subdirectories.

Can be used to find files

Example:

Attrib news86 column news86 document attributes

Attrib + R report.txt is set to read-only attrib-s-h record.txt

Attrib + :*.*

Attrib-A: *. Bak

Xcopy A: B:/a: Copy all files marked as "ARCHIVE" on disk A to disk B.

Xcopy A: B:/M: Copy all the files on disk A to disk B and move them to the archive attribute.

 

 

3. CD Introduction: CD... returns the upper-level directory "." indicates the current directory "." indicates the parent directory.

CD... is returned to the parent directory (parent directory) of the parent directory)

Cd a: // change the current directory of disk A to the root directory.

Cd a:/XX change the current directory of disk A to the subdirectory xx

CD ../98 first returns the parent directory, and then enters the 98 subdirectory under the parent directory

CD .. return to parent directory

CD/98 go to the 98 subdirectory under the root directory

 

 

4. Copy [/y] [/-y] [/V] [/B]

Copy/Y is not prompted to overwrite all files

/-Y to prompt all files (yes or no)

/V copy for verification

/B display in binary format

Copy w1.wps con/B can display WPS files on the screen without entering the WPS status

Copy ../98 copy all the files in the 98 sub-directories under the parent directory to the current sub-directory

Copy./97 when all the files in the 97 sub-directories under the current directory are copied to the current directory

Copy. C: // copy all files in the current directory to the C root directory.

. Indicates *. * File

Copy nul a. ABC to clear the. ABC file (the file length is changed to 0)

Copy file name + con append commands or content to text files

Copy con file name create text file (F6 save disk Exit)

Copy con PRN detection printer Switch

 

 

V. xcopy command

Xcopy [Source] [D: DATE] [/P] [/S] [/E] [/V] [/y]

Xcopy [D: DATE] xcopy A: B: // D: 08/18/98/S/V copy files after 98.08.18

Xcopy [/P] prompts you to create a subdirectory

Copy xcopy [/S] along with subdirectories. Note: If this subdirectory does not exist on the target disk

If the disk end is not ended with "/", the following message is displayed:

Does destination specify a file name or directory name on the target

[F = file, D = Directory]?

Create a file on the target disk [press] or create a subdirectory [press d]? D key should be selected

Xcopy [/V] with verification

* (1) If xcopy does not copy system or hidden files, you must modify the attributes before copying them.

Whether a prompt is displayed when xcopy [/y] is overwritten, And/y does not contain a prompt

If the target disk or subdirectory name is omitted, copy it to the current directory.

 

 

 

Vi. DEL/P

Add/P to indicate whether to prompt before deletion

If the sub-directory name is added after del, all the files under the sub-directory (except hidden. system. Read-Only files) will be deleted,

Add/P to confirm.

 

 

 

VII. undelete [name]/Au

Restore all files that meet the conditions (which can be recovered) without prompting, and set the initial letter to "#". If

If yes, add it in the order of "# % & 0 1 2-9 A-z.

For example, undelete *. DBF/Au restores all files with the extension "DBF" and starts with "#" as files.

Name,/list only lists the files that can be recovered, without restoring

Undelete/load: Load undelete into memory

/Unload undelete out of memory

/S [Drive] monitors and manages the specified drive

Undelete/SC

Resident undelete in memory ,? Create an implicit sentry sub-directory to delete files on drive C.

Manage undelete/DS recovery

The recovery command can use undelete to completely restore the file name (very complete)

Most commonly used undelete *.*

Deltree/Y [drive: path]

Deltree deletes subdirectories and files, although some files are system files or hidden files

It can contain wildcards. When it contains wildcards, it will delete files and subdirectories that meet the conditions.

For example :? Undelete *. DBF/Au restores all files with the extension "DBF" and starts with "#" as files.

Name.

/List only lists files that can be recovered without restoration.

Undelete/load: loads undelete into memory.

/Unload undelete the memory.

/S [Drive] monitors and manages the specified drive.

Undelete/SC: resident memory of undelete and create an implicit sentry sub-directory to delete drive C

You can use the undelete/DS command to completely restore the file name (perfect ).

The most commonly used is undelete *.*

 

 

 

8. deltree/Y [drive: path]

Deltree deletes subdirectories and files, although some files are system or implicit.

It can contain wildcards. In this case, it will delete files or subdirectories that meet the conditions.

For example, L1 files, L2 subdirectories, L3 files, and L4 subdirectories exist.

Deltree L *. * will delete all the above files and subdirectories, but confirm before deletion. If not,

You can enter "N ".

The/y parameter is deleted without confirmation.

The deleted files can be restored using undelete ,? However, the sub-directories and their files cannot be recovered.

Special tools, such as Norton 8.0.

If undelete/s is used in advance ,? Then you can find the complete file in the sentry subdirectory, but the name is already

Changed.

 

 

 

9. Dos = high [| low [umb | noumb]

DOS = high; umb loads itself into high-end memory (high) and manages the upper-level memory (umb ).

Noumb does not manage the upper-level memory.

Device = himem. sys should be loaded before writing dos = high and umb.

To load a program or driver into the upper-level memory, DOS = umb must be used to save most of the general memory.

You can write dos = high and umb at any position in config. sys.

If HMA not avoiable or load down low is displayed, high-end memory cannot be used.

 

 

 

10. The doskey records the previously typed doscommands. You can use F7 to display them, use "commandid" to select them, and use F9 to input them.

Command number.

Doskey/restall is reloaded once, and the previous command line is revoked.

Doskey/history shows all the commands in the memory. You can ">" display them to other files, abbreviated as "/H ".

Doskey dir = CLs, the same as Cls.

Doskey/macros can display all macro definitions. You can use ">" to redefine them to a file, which can be abbreviated as "/m ".

Doskey dir = undefinable macro definition of Dir.

Doskey P = dir $ tdir *. EXE/p $ tdir C:/T $ *

$ T indicates the command delimiter, while $ * indicates the command Terminator.

Doskey/insert (overstrike )? When you re-enter the command, whether to insert or override the old command

Status (default ).

 

 

 

Eleven unzip emm386.exe

Provides management of the extended memory so that the application can use it just like the regular memory.

The common usage is in config. sys.

Device = C:/DOS/himem. sys

Device = C:/DOS/emm386.exe Ram

D = 64 set the DMA memory quantity to 64 K

Noems provides access to the upper-level memory, but does not provide access to the extended memory.

It should be noted that it is best not to use it in windows, because Windows itself manages extended memory.

Program. Use the manager in windows.

 

 

 

12. FC command FC/B dt. dat dt2.dat> B (for binary code comparison)

Compares two files, which are generally used for access progress and modifying game storage files.

The actual code location should contain 0100, for example, 0000 05e4: 00 67.

0100 or 0000 06e4: 00 67 should be added when debugging-E is used.

Add the redirected file "> P" to output the comparison result to the P file.

 

 

13. Format/Q/u/S/N: Sectors/F: Size/C

/Q Parameter: Quick formatting. Only the File Allocation Table and root directory are scanned. this parameter is only valid for formatted disks.

Make sure that no new bad channels are added after formatting.

/U parameter: It is unconditionally formatted and does not save the information on the original disk. This prevents "unformat ".

/S parameter: format it as a system disk, or use the "sys" command.

/F: The size can be 160 180 320 360 720 1200 1440 2800

/N: Sector N can be 1-Side Disk with a capacity of 160 K and 180 K

You can format a k disk on a 4-inch high-density drive.

You can format 8 sectors on a 5-inch high-density drive.

/C re-test the bad slice. If one slice is marked as "bad", the format will not be tested in the future.

Test, marked only. You can test it again when "/C" is used.

 

 

 

 

14. unformat command

The command that uses the format and does not use the "/u" parameter takes effect. It can be used to fix the loss.

Bad hard disk partition table, but does not work for network disks.

Unformat drive: [/L] [/test] [/P]

/L display each file and subdirectory found by unformat. If this switch is not enabled, only those files and subdirectories are displayed.

For broken files and subdirectories, press Ctrl + S to pause and press any key to continue.

/Test only performs one test, without actual repair work, and simulates the process.

/P: print the data while testing.

Note: This method cannot repair all files, especially disks that have been formatted and added with data.

The recovered files are stored in sub-directories such as subdir1.... 2... 3.

 

 

 

15. interlnk syntax interlnk G = E. It can communicate with each other through a serial port or a parallel port.

Map the E drive on the server to the G drive of the client.

All operations mean access to the server. The method for canceling the ing is interlnk G =

Enter interlnk separately to display all mappings.

Note: interlnk plugin can be used only when the driver is installed with the interlnk.exe device.

The drive letter and config .? The number of lastdrv.exe settings in sysis related.

The connection mode is as follows:

5-7 2-15

3-2 3-13

7-4 4-12

6-6 5-10

3-3 6-11

8-5 15-2

4-20 13-3

9-25-12-4

10-5

11-6

25-25

25-pin 25

 

 

 

、Interlnk.exe and intersvr.exe

Interlnk.exe redirect requests from the client drive or print interface to another Server Driver

Or printer.

Syntax: add the following to config. SYS:

Device = C:/DOS/interlnk.exe [drive: N] [/noprinter] [COM] [LPT]

 

 

 

17. memmaker [/B] [/batch] [session] [/swap: Drive]

Memmaker can optimize the memory configuration ,? Write the configuration to autoexec. BAT and config. sys.

In this process, you need to restart the machine several times.

 

 

 

 

18. memitem memcolor memdefault submenu menu option include

In autoexec. BAT: config. SYS:

Path C:/DOS; C:/UCDOS [menu]

Doskey menucolor = 15, 1 (foreground color 15, background color 1)

/Mouse menuitem = base_config, This is a base

Goto % config %-> choose menuitem = cced_config, This Is A CCed

Option prompt

: Base_config menudefault = base_config, 5

Goto exit-> the default bounce time is base_config. The delay is 5 seconds.

: Cced_config [common]

C:/DOS/smartdrv.exe/L device = C:/DOS/himem. sys

Goto exit the common part of each item

: Exit-> end [base_config]

Device = C:/DOS/emm386.exe Ram

DOS = high, umb

[Cced_config]

Device = C:/DOS/smartdrv.exe/double_buffer

Include = base_config include base_config settings

It can be selected based on the computer's Configuration Requirements under different circumstances.

 

 

 

 

19. mscdex.exe provides a program for reading and writing the optical drive.

Mscdex/D: Drive [/D: Drive] [/E] [/K] [/S] [/L: letter]

Typical: Device = C:/CDROM. sys/D: mscd000 in config. sys

In autoexec. bat, C:/DOS/mscdex/D: mscd000/L: G

An optical drive is configured with the symbol G

Parameter/D: drive1 is the ID of the optical drive, which must be consistent with the symbol in config. SYS. Multiple

/D: mscd000/D: mscd001

/E: use the extended memory to mount the optical drive driver.

/S: whether to enable the shared optical drive in ms_net or Windows

/V indicates whether the memory is displayed during loading.

/L: The drive letter that the letter assigns to the optical drive.

/M: number indicates the number of buffers.

Note :? If smartdrv.exe is used to accelerate the read/write capability of the optical drive, it should be in autoexec.

In bat, mscdex .? Before the EXE is written in smartdrv.exe, the use of smartdrv.exe can be greatly improved.

The ability to read and write the drive.

 

 

 

20. Use of MSD

MSD allows you to check computer configurations and system information.

Including :? Driver parameters, computer CPU parameters, memory size parameters, display type, string-and-parallel port conditions,

And the usage of each IRQ. Based on this, you can analyze whether the new device conflicts with the original device.

At the same time, you can analyze the memory resident program to determine whether there is a virus in the memory. If yes, It is marked "??? ".

 

 

 

 

21. Prompt DOS prompt

$ Q equal sign $ t current time $ D current date $ P current drive symbol

$ # Prompt $ n current drive $ g greater than sign $ l less than sign $ B display "|" MPS queue No.

$ H hide the prompt $ e to display "<-"

For other text, the prompt ljw of the text is directly displayed, and the prompt is ljw prompt.

Prompt only displays the current drive letter and greater than the number.

 

 

 

 

22. ramdrive. sys uses memory as a virtual disk.

It should be noted that all data is stored in the memory and should be stored in the hard disk in a timely manner. Otherwise, after power loss or crash

All data will be lost, the advantage is that the operation speed is fast, but cannot be used in windows.

Example: config. SYS: Device = C:/DOS/ramdrive. sys/size [/E | A]

Size is the number of bytes in K, that is, the size of the created virtual disk.

/E or/A both use extended memory to create a virtual disk ,? To add parameters, you must first load memory management.

Himem.sysand emm386.exe.

 

 

 

 

23. SUBST connects a drive to a sub-directory

For example, if a request to the:/L1/L2 sub-directory is mapped to the S disk, enter

SUBST s: A:/L1/L2

Use dir S :? The contents in the:/L1/L2 sub-directory are displayed.

You can use subst s: d to cancel this ing.

SUBST can be used to display various join conditions

Note :? You can use SUBST a: C: A to create a read/write disk for.

For example ,? You must use disk A for installation. You can copy all the software you want to install to C:.

Directory, enter SUBST a: C: A, and then go to a: to install the software.

 

 

 

Twenty-four, MEM/C/M/P/D Regular memory display program

/C shows the usage of all memory resident programs, including conventional regular memory and uppermemory

High-end memory usage and overall usage (regular high-end reserved extended memory)

/P page display, pause between pages

The/m post-added Module name is as follows:/M msdos displays the memory usage of the DOS system.

/D detailed examples of regular high-end reserved extended memory

Through analysis, we can see whether the memory usage is reasonable and whether various programs are loaded normally.

Based on the memory optimization tool memmaker for various management, but also can analyze some program crashes

If "??? ", It can be determined that there is a virus in the memory, is conducive to the discovery and elimination.

 

 

 

 

25. Use of various pipeline Tools ">>><"

Rewrite the output or required input caused by various commands

For example, dir *. BAT/B> P can output the file name in the dir *. Bat example to the P file.

Time <p> P. bat

If there is only one carriage return in the P file, you can append the time to the P. BAT file.

">>>" Is to redirect the output generated by the command, such as to a file or printer.

> The generated content will be appended to the file.> the original file content will be overwritten.

"<" Indicates that the content to be entered in the command is reoriented.

For example, time <P can be a time code or carriage return character in the batch, which can be used to change the time.

Note that "PRN" is a printer and "null" is a null device.

Con is a display

Type P. Bat> PRN can print P. bat.

Copy null P can delete p files

Copy con P can edit P files on the screen, and F6 can save the disk and exit

Type P> PP: Copy P files to PP

Type p | more can be paused when the screen is full

 

 

 

 

26. Move command

Move [Y/-y] filename1 filename2

Move file 1 to file 2

For example, move C:/DOS/*. * C:/CCed

Move all the files in the DOS subdirectory to the CCED subdirectory.

/Y |-y indicates whether a prompt is displayed when the target directory does not exist and needs to be created.

You can use this command to modify the subdirectory name, for example, move dos CCed.

Change the DOS directory name to CCed

 

 

 

27th. append specifies the storage location of some special data files, such as user. dat pe2.pro and other non *.

EXE *. com *. BAT file

Format: append [:] to terminate a previously existing specified directory. append displays the specified conditions.

Append [path] append C:/user

 

 

 

 

28th,

Call calls another batch file in a batch command

(1) do not terminate the running of existing files, and return immediately after the application is executed.

(2) The called batch processing command must use the bat Extension

(3) When calling a batch file, you can add parameters (% 1-% 9) and environment variables such as % baud %

(4) MPs queue tools and redirection tools are unavailable.

 

 

 

 

Twenty-nine, device devicehigh loadhigh

Device loads the specified device driver into the memory

Devicehigh: load the specified device driver into high-end memory.

Loadhigh loads the specified device driver into high-end memory

 

 

 

Thirty, defrag optimized Disk

Legend (LEGEND) Optimize (optimization) elapse (lost) fragment (fragment)

This command is used to optimize the specified disk (including checking the File Allocation Table, File status, and correcting errors ).

Files can be sorted by file name size, time, and extension.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.