DOS batch processing common Commands Daquan Literacy Chapter _dos/bat

Source: Internet
Author: User
Tags clear screen

Pause
Pause command


Find
Search for a file or a string specified within a file


prompt
Set command-prompt


Ren
Batch duplicate name

Usage: ren 1.txt 2.bat

Effect: 1.txt will be changed to 2.bat


Subst s: \\*.*.*.*\c$ (this is a remote map)
\\*.*.*.* the Windows video to S disk under C disk
deleted words are
This is an example of use: subst S:/d


regedit/s
Usage: regedit/s 1.reg
Run all registry files in a batch without displaying


Assoc
modifying file associations


dir
View this catalog file


DIR/S/P "*.txt"
Display all txt files on the current disk


Rd
Delete Directory

"RD/S" is to delete everything under the directory

RD/S 123 Deletes everything under the 123 directory.


del
Deleting files

Example: del/f F:\xx

Effect: Delete xx files under f disk


type
View file content commands like *.txt


attrib
Change file Properties command


Move
Cut command "move 1.bat 123" 1.bat file cut to 123 directory


format
Format command "format D: \q"

Chkdsk
Check Disk

Path
Path=c:\dos;c:\win
To search for the current executable program


Copy
copy file commands such as: "Copy 1.txt 2" is 1 of the files copied to the 2 folder copy cannot copy directory
Copy cmd.exe \\192.168.1.102\c$
Copy cmd to the 192.168.1.102 disk


xcopy
Advanced Replication Command "xcopy AAA a123/e" copies the AAA directory to the 123 directory


Title
Change the cmd title command such as "title Cloud Community" title to the cloud habitat community.


Color
Changing background parameters such as "Color 07" is a black background white word "color 12" is a blue background green word in detail see color/?


Defrag
disk Defragmentation "Defrag C: A" analyzes fragmentation of c disk without handling "Defrag C: F" for processing


ipconfig
View native IP address commands


CLS
Clear Screen


Tree
Display current file folders and structures


Call
Running another batch does not end the parent process


mstsc
Remote Desktop Connection


Ping Computer Name
Computer name gets IP
Ping's return TTL value confirms the operating system
xp/2000 TTL value of 128
WINDWOS98 is 64
UNIX is 255


ping/n 3 127.0.0.0>nul
Send 3 times to IP, 6 seconds along


Date
Show current date no time now


Time
Displays the current time when the time is not updated


Taskkill
End Process


tasklist
viewing processes


echo Goodbye & Pause>nul
At the end of the time is not to greet any key to the end, but goodbye can be written at the same time, can also be removed "echo Goodbye &" is nothing to show


shutdown
Shutdown command


Start
Open a program or folder


SC config open service type
sc Config Service name start= demand//Manual
SC condig Service name start= Auto//Auto
sc config service name start= disabled//disabled
For example, you want to turn on the disabled Telnet service,
sc config telnet start= auto, error:
[SC] OpenService FAILED 1060,
Because the service name of Telnet is not telnet but tlntsvr, sc config tlntsvr start= Auto is OK


mode con
Displays the length and width of the command prompt
Mode con cols=113 lines=15
Height is 15 width of 113


nslookup
See how much the local DNS service is


start
open Things in 32-bit color

More commands can be viewed here: http://www.jb51.net/shouce/dos/

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.