![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-13 04:17 |
47,811 topics / 349,897 posts / today 0 new / 48,256 members |
| DOS学习入门 & 精彩文章 (教学室) » Explanation of DOS Commands (I'm also a novice) |
| Printable Version 2,470 / 29 |
| Floor1 kkqq123 | Posted 2003-11-27 00:00 |
| 初级用户 Posts 28 Credits 236 | |
|
Let's start with dir
DIR attributes]] sortorder]] timefield]] Specifies the drive, directory, and/or files to list. /A Displays files with specified attributes. attributes D directory R read-only file H hidden file A file ready for archiving S system file - prefix meaning "not" /B Uses bare format (no header information or summary). /C Displays thousand separator in file sizes. This is the default. Use /-C to disable separator display. /D Same as wide but files are listed in columns. /L Uses lowercase. /N New long list format where filenames are on the far right. /O Lists files in sorted order. sortorder N by name (alphabetic) S by size (smallest first) E by extension (alphabetic) D by date/time (oldest first) G directories first - prefix to reverse order /P Pauses after each screenful of information. /Q Displays file owner. /S Displays files in specified directory and all subdirectories. /T Controls which time field to display or use for sorting. timefield C creation time A last access time W last written time /W Uses wide list format. /X Displays short names generated for non 8dot3 filenames. The format is that of /N with the short name inserted before the long name. If there is no short name, blanks are displayed in its place. /4 Uses four-digit year Switches may be pre-set in the DIRCMD environment variable. To override pre-set switches, prefix with - (hyphen). For example, /-W. |
|
| Floor2 kkqq123 | Posted 2003-11-27 00:00 |
| 初级用户 Posts 28 Credits 236 | |
|
cd
Displays the name of the current directory or changes the current directory. CHDIR CHDIR CD CD .. Specifies to change to the parent directory. Typing CD drive: displays the current directory on the specified drive. Typing CD by itself displays the current drive and directory. Using the /D command-line switch changes the current drive in addition to changing the current directory of the drive. If extended command handling is enabled, CHDIR will change as follows: The current directory string is converted to use the case of the letters on the disk. So, if the case on the disk is like this, CD C:\TEMP will set the current directory to C:\Temp. The CHDIR command does not treat spaces as delimiters, so it is possible to change the directory name to a subdirectory name with spaces but without quotes. For example: cd \winnt\profiles\username\programs\start menu is the same as: cd "\winnt\profiles\username\programs\start menu" In the case where extended functionality is disabled, you must type the above command. |
|
| Floor3 kkqq123 | Posted 2003-11-27 00:00 |
| 初级用户 Posts 28 Credits 236 | |
|
Create directory.
MKDIR path MD path If command extensions are enabled, MKDIR will change as follows: If necessary, MKDIR will create intermediate directories in the path. For example: Suppose \a does not exist, then: mkdir \a\b\c\d Is the same as: mkdir \a chdir \a mkdir b chdir b mkdir c chdir c mkdir d Same. If extensions are disabled, you need to type mkdir \a\b\c\d. |
|
| Floor4 kkqq123 | Posted 2003-11-27 00:00 |
| 初级用户 Posts 28 Credits 236 | |
|
Delete a directory.
RMDIR path RD path /S In addition to the directory itself, all subdirectories and files under the specified directory will also be deleted. Used to delete the directory tree. /Q Quiet mode, when deleting the directory tree with /S, no confirmation is required |
|
| Floor5 kkqq123 | Posted 2003-11-27 00:00 |
| 初级用户 Posts 28 Credits 236 | |
|
Copy one or more files to another location.
COPY source ] source Specifies the file(s) to copy. /A Indicates an ASCII text file. /B Indicates a binary file. /D Allows decrypting the target file to be created destination Specifies the directory and/or filename for the new file. /V Verifies that new files are written correctly. /N When copying a file with a non-8dot3 name, use the short filename if possible. /Y Suppresses prompting to confirm rewriting an existing target file. /-Y Prompts to confirm rewriting an existing target file. /Z Copies a networked file in restartable mode. The command-line switch /Y may be preset in the COPYCMD environment variable. This may be overridden with /-Y on the command line. Unless the COPY command is executed in a batch script, the default is to prompt on overwrite. To append files, specify a single file for destination and several files for source (using wildcards or file1+file2+file3 format). |
|
| Floor6 kkqq123 | Posted 2003-11-27 00:00 |
| 初级用户 Posts 28 Credits 236 | |
|
Display or change file attributes.
ATTRIB filename] ] + Set attribute. - Clear attribute. R Read-only file attribute. A Archive file attribute. S System file attribute. H Hidden file attribute. Specify the file attributes to be processed. /S Process matching files in the current folder and its subfolders. /D Also process folders. |
|
| Floor7 kkqq123 | Posted 2003-11-27 00:00 |
| 初级用户 Posts 28 Credits 236 | |
|
Display the folder structure of a drive or path graphically.
TREE /F Displays the names of the files in each folder. /A Uses ASCII characters instead of extended characters. |
|
| Floor8 tdj | Posted 2003-11-27 00:00 |
| 银牌会员 Posts 332 Credits 1,131 | |
|
Very good
|
|
| Floor9 龙王 | Posted 2003-11-27 00:00 |
| 银牌会员 Posts 334 Credits 1,186 | |
|
Why can't I find the delete button if the upload was not successful
|
|
| Floor10 龙王 | Posted 2003-11-27 00:00 |
| 银牌会员 Posts 334 Credits 1,186 | |
|
Quickly Master DOS 6.22Open Attachment
|
|
| Floor11 kkqq123 | Posted 2003-11-29 00:00 |
| 初级用户 Posts 28 Credits 236 | |
|
Some Commands I Know
ASSOC Displays or modifies file extension associations. AT Schedules commands and programs to run on a computer. ATTRIB Displays or changes file attributes. BREAK Sets or clears extended CTRL+C checking. CACLS Displays or modifies the access control lists (ACLs) of files. CALL Calls one batch program from another. CD Displays the name of the current directory or changes it. CHCP Displays or sets the active code page number. CHDIR Displays the name of the current directory or changes it. CHKDSK Checks a disk and displays a status report. CHKNTFS Displays or modifies the boot-time disk check. CLS Clears the screen. CMD Opens another Windows command interpreter window. COLOR Sets the default console foreground and background colors. COMP Compares the contents of two or more files. COMPACT Displays or changes the compression of files on NTFS partitions. CONVERT Converts a FAT volume to NTFS. You cannot convert the current drive. COPY Copies at least one file to another location. DATE Displays or sets the date. DEL Deletes at least one file. DIR Displays files and subdirectories in a directory. DISKCOMP Compares the contents of two floppy disks. DISKCOPY Copies the contents of one floppy disk to another. DOSKEY Edits command lines, calls Windows commands, and creates macros. ECHO Displays a message, or turns command echoing on or off. ENDLOCAL Ends localization of environment changes in a batch file. ERASE Deletes at least one file. EXIT Quits the CMD.EXE program (command interpreter). FC Compares two or more files and displays the differences. FIND Searches for a text string in a file. FINDSTR Searches for strings in a file. FOR Runs a specified command for each file in a set. FORMAT Formats a disk for use with Windows. FTYPE Displays or modifies the file type used in file extension associations. GOTO Directs the Windows command interpreter to a labeled line in a batch program. GRAFTABL Enables Windows to display an extended character set in graphics mode. HELP Provides help information for Windows commands. IF Performs conditional processing in a batch program. LABEL Creates, changes, or deletes the volume label of a disk. MD Creates a directory. MKDIR Creates a directory. MODE Configures system devices. MORE Displays one screenful of results at a time. MOVE Moves a file from one directory to another. PATH Displays or sets the search path for executable files. PAUSE Pauses processing of a batch file and displays a message. POPD Restores the previous value of the current directory saved by PUSHD. PRINT Prints a text file. PROMPT Changes the Windows command prompt. PUSHD Saves the current directory then changes it. RD Deletes a directory. RECOVER Recovers readable information from a bad disk. REM Records comments in a batch file or CONFIG.SYS. REN Renames a file. RENAME Renames a file. REPLACE Replaces files. RMDIR Deletes a directory. SET Displays, sets, or removes Windows environment variables. SETLOCAL Begins localization of environment changes in a batch file. SHIFT Shifts the position of replaceable parameters in a batch file. SORT Sorts input. START Starts another window to run a specified program or command. SUBST Associates a path with a drive letter. TIME Displays or sets the system time. TITLE Sets the window title for a CMD.EXE session. TREE Displays the directory structure of a drive or path in graphic mode. TYPE Displays the contents of a text file. VER Displays the Windows version. VERIFY Tells Windows whether to verify that files are written correctly to disk. VOL Displays the disk volume label and serial number. XCOPY Copies files and directory trees. |
|
| Floor12 kkqq123 | Posted 2003-11-29 00:00 |
| 初级用户 Posts 28 Credits 236 | |
|
ASSOC Displays or modifies file extension associations Detailed explanation of ASSOC ]]
.ext Specifies the file extension associated with the file type fileType Specifies the file type associated with the file extension Type ASSOC without parameters to display current file associations. If you call ASSOC with only a file extension, it displays the current file association for that file extension. If you do not specify any parameters for the file type, the command deletes the association for the file extension. |
|
| Floor13 kkqq123 | Posted 2003-11-29 00:00 |
| 初级用户 Posts 28 Credits 236 | |
|
The AT command is used to schedule commands and programs to run at specific dates and times.
To use the AT command, the Scheduling Service must be running. AT | /DELETE ] AT time | /NEXT:date] "command" \\computername Specifies a remote computer. If this parameter is omitted, the command will be scheduled to run on the local computer. id Specifies the identification number assigned to a scheduled command. /delete Deletes a scheduled command. If id is omitted, all scheduled commands on the computer will be deleted. /yes Used with the command to delete all jobs when no further confirmation is needed. time Specifies the time to run the command. /interactive Allows the job to interact with the desktop of the user who is logged on at the time it runs. /every:date Runs the command on the specified dates each month or week. If the date is omitted, it defaults to running on the same day of each month. /next:date Specifies that the command will run on the next specified date (for example, next Thursday). If the date is omitted, it defaults to running on the same day of each month. "command" The Windows NT command or batch program to be run. |
|
| Floor14 kkqq123 | Posted 2003-11-29 00:00 |
| 初级用户 Posts 28 Credits 236 | |
|
break
Set or clear the extended CTRL+C detection for the DOS system This command is retained for compatibility with the DOS system and does not work in Windows XP. If command extensions are enabled and the operating platform is Windows XP, the BREAK command will enter a hard-coded breakpoint when being debugged by a debugging program. |
|
| Floor15 kkqq123 | Posted 2003-11-29 00:00 |
| 初级用户 Posts 28 Credits 236 | |
|
cacls
Displays or modifies the access control list (ACL) of a file CACLS filename ] ] ] filename Displays the ACL. /T Changes the ACL of the specified file in the current directory and all its subdirectories. /E Edits the ACL instead of replacing it. /C Continues on access-denied errors. /G user:perm Grants access rights to the specified user. Perm can be: R Read W Write C Change (Write) F Full control /R user Revokes the access rights of the specified user (valid only when used with /E). /P user:perm Replaces the access rights of the specified user. Perm can be: N None R Read W Write C Change (Write) F Full control /D user Denies access to the specified user. Wildcards can be used in the command to specify multiple files. Multiple users can also be specified in the command. Abbreviations: CI - Container inherit. ACEs will be inherited by directories. OI - Object inherit. ACEs will be inherited by files. IO - Inherit only. ACEs do not apply to the current file/directory. |
|
| 1 2 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |