DOS script (2)

Source: Internet
Author: User
Iii. Disk operation commands:
1. Vol: displays the volume label and serial number of the disk.
2. Label: creates, modifies, or deletes the volume label of a disk.
3. fdisk: disk partition command. ****
4. Format C:/Q/S/Y: Format disk command ****
5. D:/C: change the current disk.
6. Ghost ****

4. File Operation commands:
1. Copy command: Copy at least one file to another location.
Copy command tips:
1. File merging D: \ Copy 002.jpg/ B + 001.txt/ A 003.jpg
2. Create a text file, edit the content of the text file, and save it with Ctrl + Z. Copy con AA. txt
3. Deleting a file makes it unrecoverable: copy the file name to be deleted by NUL
4. Text File display copy *. txt con
2. Type: displays the content of a text file.
3. attrib displays or changes file attributes
The drive letter and path indicate the attrib. EXE location.
Parameter + S/-S: set or cancel System Properties for the specified file.
Parameter + H/-H: set or cancel the implicit attribute for the specified file.
Parameter + R/-R: set or cancel the read-only attribute for the specified file.
Parameter + A/-A: set or cancel the archive attribute for the specified file.
4. DEL: File Deletion command
5. FC: compare two or two sets of files and display the differences.
6. Find: Search for text strings in the file.
7. Move: Move the file from one directory to another.
8. Edit: Text Editor
9. xcopy directory Copy command:
Parameter/S: Indicates copying all files and Their subdirectories. If/s is not included, the subdirectories are not copied.
Parameter/E: must be used with/s to copy all files and Their subdirectories. empty directories are also copied. If this parameter is not included, empty directories will not be copied.

5. network operation commands:
I. Ipconfig: view your IP address
Parameter:/all lists the details of the local IP address;
/Release clear local IP information;
II. Systeminfo.

3. Ping: send data packets to the specified IP address.
Reply from bytes = 32 time = 15 ms TTL = 128
Reply from bytes = 32 time <1 ms TTL = 128
Reply from bytes = 32 time <1 ms TTL = 128
Reply from bytes = 32 time <1 ms TTL = 128

Ping statistics for
Packets: Sent = 4, stored ED = 4, lost = 0 (0% loss ),
Approximate round trip times in Milli-seconds:
Minimum = 0 ms, maximum = 15 ms, average = 3 ms

TTL = 127 or 128 (Windows 9x)
TTL = 240 or 241 (Linux)
TTL = 252 (other)
TTL can be changed through the peer computer settings and network conditions
Ping packet size

4. Net: Powerful commands
Net Sue // ip/IPC $ "" Administrator creates an IPC $ connection
Net user netcicala 12345/Add create a netcicala User Password of 12345
Net localgroup administrators netcicala/Add add netcicala to the Administrators group.
Net user netcicala view the user information of netcicala
NET Share to view the local share list
Net start displays the services running on the current host
Net start XXX (Service name): used to start the service.
Net stop XXX (Service name): Stop Service xxx
Net view IP Address: view shared resources on the target computer
Net config server/hidden: Yes, so that the network neighbor cannot see you
Net config server/hidden: No is enabled to let network neighbors see you

5. Netstat: displays the Protocol statistics and the current TCP/IP network connection.
-A displays all connection and listening ports.
-B: displays the information contained in creating each connection or listening port.
Executable components. Executable components are known in some cases
Has multiple independent components, and in these cases
Component sequence included in creating a connection or listening port
Displayed. In this case, the executable component name
In [] at the bottom, the top is the component it calls,
Wait until the TCP/IP part. Note this option
It may take a long time. If you do not have sufficient permissions, it may fail.
-E displays Ethernet statistics. This option can be combined with the-s option.
-N: the address and port number are displayed in numbers.
-O displays the ID of the process associated with each connection.
-P proto shows the connection of the Protocol specified by proto; proto can be
One of the following protocols: TCP, UDP, tcpv6, or udpv6.
If used with the-s option to display statistics by Protocol, proto can be one of the following protocols:
IP, IPv6, ICMP, ICMPv6, TCP, tcpv6, UDP, or udpv6.
-R shows the route table.
-S displays statistics by protocol. By default, the IP address,
Statistics of IPv6, ICMP, ICMPv6, TCP, tcpv6, UDP, and udpv6;
The-P option is used to specify the default subset.
-V and-B options will be included in
Creates a connection or listener port for All executable components.
Interval re-displays the selected statistics.
Pause interval (in seconds ). Press Ctrl + C to stop and restart
Displays statistics. If omitted, netstat displays the current
Configuration Information (only once)

6. System Debugging commands:
Debug clear CMOS

========================================================== ==========================================
DOS Internal commands in the WINXP age
Assoc displays or modifies file extension associations.
At is the command and program to be run on the computer.
Set or clear the extended Ctrl + C check.
Cacls displays or modifies the File Access Control List (ACLs ).
Call calls this one from another batch processing program.
CD displays or changes the name of the current directory.
Chcp displays or sets the number of pages of the active code.
Chdir displays or changes the name of the current directory.
Chkdsk checks the disk and displays the 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 color.
Comp compares the content of two or two sets of files.
COMPACT Displays or changes the compression of files on NTFS partitions.
CONVERT Converts a fat volume to NTFS. You cannot convert
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 two floppy disks.
Diskcopy copies the content of one floppy disk to another.
Doskey: edit the command line, call the Windows Command, and create a macro.
ECHO Displays the message, or explicitly opens or closes the command.
Endlocal ends the localization of Environment Changes in the batch file.
Erase deletes at least one file.
Exit to exit the cmd. exe program (command interpreter ).
FC compares two or two sets of files and displays
Different Places.
Find searches for text strings in the file.
Findstr searches for strings in the file.
For runs a specified command for each file in a set of files.
Format the disk for use with windows.
FTYPE Displays or modifies the file type associated with the file extension.
Goto direct the Windows command interpreter to a batch processing program
Is specified.
Graftabl enables Windows to display images
Extended character set.
Help provides help information for Windows commands.
If executes conditional processing in the batch processing program.
Label to create, change, or delete the volume label of a disk.
MD creates a directory.
Create a directory using mkdir.
Mode: configure the system device.
More: display a result screen at a time.
MOVE Moves the file from one directory to another.
Path: displays or sets the search path for executable files.
PAUSE Suspends processing of batch files and displays messages.
Popd restores the previous value of the current directory saved by pushd.
Print a text file.
Prompt to change the Windows command prompt.
Pushd saves the current directory and changes it.
Rd deletes the directory.
Recover restores readable information from the faulty disk.
Rem record comments in a batch file or config. sys.
Rename the file.
Rename the file.
Replace the file.
Delete the rmdir directory.
Set displays, sets, or deletes Windows environment variables.
Setlocal starts localization of Environment Changes in the batch file.
Shift changes the positions of parameters that can be replaced in a batch file.
Sort classifies input.
Start starts another window to run the specified program or command.
SUBST Associates the path with a drive letter.
Time: displays or sets the system time.
Title: Set the title of the cmd. EXE session.
Tree displays the directory structure of the drive or path in graphic mode.
Type: displays the content of a text file.
Server displays the Windows version.
Verify tells windows whether to verify that the file is correct
Write Data to the disk.
VOL Displays the volume label and serial number of the disk.
Xcopy copies the file and directory tree.


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: 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.