How to Use the DOS command

Source: Internet
Author: User

How to Use the DOS command

(1) List of DIR disk file directories. This command allows you to list the names and attributes of disk files.

For example:> DIR (Enter); after you press Enter, all files in the current directory are displayed.

> DIR/P (Enter:

Strike a key when ready... Continue list by any one

> DIR/W (ENTER); only the file names and extensions in the current directory are displayed.

(2) create a sub-directory in MD. This command allows you to create a sub-directory on the DOS disk.

For example,> md user (ENTER); after you press ENTER, the 'USER' subdirectory is created.

(3) Change CD to the current working directory.

For example,> cd user (ENTER); then, the screen is displayed:>

(4) Delete a subdirectory in RD (only when there are no files in the subdirectory ).

(5) DEL delete file this command allows you to discard unwanted disk files.

For example,> del a. ASM; The A. ASM file in the current directory.

> DEL *. ASM; all. ASM files in the current directory.

> DEL *. *; all files in the current directory.

(6) The CHKDSK displays the current disk status.

For example,> CHKDSK/V; displays all file names and their paths on the disk.

> CHKDSK/F;

(7) FORMAT the new disk used for DOS formatting.

For example,> format B :( ENTER); Press ENTER to FORMAT disk B.

(8) COPY <Source File> <target File> (Enter); Create a COPY of the file.

For example, copy a. asm B. ASM; COPY the. ASM file to the B. ASM file.

(9) REN <old file name> <New File Name>; rename the file.

For example:> ren a. asm B. ASM (Enter); Press Enter, and the. ASM file is renamed B. ASM.

(10) TYPE <File Name>; displays the file content. This command allows you to display the content of an ASCII code file to the screen.

For example,> type a. ASM (ENTER); Press ENTER to display the. ASM file on the screen.

 

The following are partial commands for MS-DOS

Command word

Ransomware

For example

APPEND

Create a data file search directory

Append c:; B:

ASSIGN

Dispatch drive request

Assign a = c B = C

ATTRIB

Set file attributes

ATTRIB + RREPORT. TXT

BACKUP

Disk File dump

Backup c::

BREAK

DOS interrupt Switch

Break on, BREAK OFF

CHCP

Change Country Code

CHCP 863

CHDIR

Change current directory

CD

CHKDSK

Disk status check

Chkdsk a:> STATUS

CLS

Clear display screen

CLS

COMMAND

Load command Handler

COMMAND

COMP

Disk File comparison

Comp c: *. asm B: *. BAK

COPY

Copy Disk Files

COPY *. txt combin. DOC

CTTY

Change main console

CTTY AUX

DATE

Enter system date

DATE 3-9-94

DEL

Delete Disk Files

Del vacation .*

DIR

Column File Name List

DIR, DIR/W/P, DIR *. ASM

DISKCOMP

Compare two floppy disks

Diskcomp:

DISKCOPY

Copy the entire floppy disk

Diskcopy:

EXE2BIN

EXE file conversion

EXE2BIN HELLO. exe hellow. COM

EXIT

Exit command

EXIT

FASTOPEN

Quick file opening

Fastopen c: = 100

FDISK

Hard Disk DOS partition

FDISK

FIND

Output the specified string

FIND "penpencil Sharpener" penpencil.

FORMAT

Disk sector formatting

Format B:, FORMAT A:/S

GRAFTABL

Load a drawing table

GRAFTABL

GRAPHICS

Screen Image Printing

GRAPHICS

JOIN

Drive connection directory

Join d: C:

KEYB

Disk replacement program

KEYB FR

LABEL

Set the disk volume name

Label a: SALES1994

MKDIR

Create a subdirectory

MD

MODE

Set the device Operation Method

MODE COM1: 2400, N, 8, 1, p

MORE

Screen Display Filtering

MORE <TEST. TXT

NLSFUNC

Support code page

Nlsfunc newcdpg. SYS

PATH

CREATE command search directory

PATH;, PATH; C: worker par

PRINT

Print files offline

PRINT/T/D: LPT1, print pen. RC/C

PROMPT

Set system prompt

PROMPT $ P $ G

RECOVER

Recover Disk Files

Recover:

REN

File rename

REN *. TXT *. DOC

REPLACE

Support code page

Replace a:. cli c: S

RESTORE

Disk File recovery

Restore a: C:. MNT

RMDIR

Delete a subdirectory

RD

SELECT

Select Country Code

Select B: A: 049 GR

SET

Set the runtime environment

Set file = TAXES.86

SHARE

Mount a file sharing program

SHARE

SORT

File Sorting Filtering

SORT/R <EXPENSES. TXT

SUBST

Drive replacement path

Subst z: B:

SYS

Transfer System implicit File

Sys:

TIME

Input System Time

TIME 13: 36

TREE

Display directory paths

Tree c:/F | MORE

TYPE

Show File Content

Type holiday. MAR

VER

Show DOS version

VER

VERIFY

Verify write data

VERIFY, verify on, VERIFY OFF

VOL

Show disk volume labels

Vol:

XCOPY

Copy files and subdirectories

Xcopy a: B:/S/E

<

Standard Input Device redirection

MYPROG <INPUT. TXT

>

Standard output device redirection

Type story. TXT> PRN

>

Output to the end of the specified file

Type new> OLD

|

MPs queue for standard devices

FILENAME1 | FILENAME2 | FILENAME3

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.