Command line Learning Backup

Source: Internet
Author: User

Batch processing Basics (1)

Main content: Common grammar commands (if, for, echo, choice ... ), parameter use, Combo command, Pipeline command, Operation Registry, instance Demo

Links: Http://wenku.baidu.com/view/fd165d2acfc789eb172dc812?fr=prin

Batch processing Basics (2)

Main content: The introduction of parameters, special symbols, variables, examples of demonstration

Links: Http://wenku.baidu.com/link?url=dg4ehUDDtGrTcliUnieMR47dXWY9yiXxBxgPks_ Cxrgb3aybmj5tsek4tl9dkvdt7rx2ke6ck-zvfwdja3pfldrg3sopzzeiukmyurw-8u_

MS-DOS (Microsoft Disk Operating System)

Main content: DOS, origin, history, DOS composition, file directory, command complete, check Trojan

Links: http://baike.baidu.com/view/61797.htm

batch hides itself window

Main content: Title

Links: http://www.jb51.net/article/14352.htm

Study notes:

1,%cd% represents the value of the current path

2, for loop of mind can have many kinds of, use different form need to add different parameters:

For example: for/l%variable in (start,interval,end) does command variable (in batch, the use of variables need to appear in a special form%%variable)

Traverse Delete D:\release D:\debug

@echo off for/f "delims="%%a in (' Dir/b/s/ad d:\Release d:\Debug ') do echo rd/s/q "%%a" 2>nul Pause

3, delete the file can use the command del/erase

Delete directory can be rd/rmdir with command

After the plus/s is removed, all of the plus/q expressions are deleted without prompting for deletion.

4, the batch in front of the redirection character can not directly add numbers, you have to use spaces, equal signs, points separated

echo aaaaa.bat >> b.txt means Aaaaa.bat This string is displayed in B.txt

Type Aaaaa.bat >> B.txt indicates that the contents of the Aaaaa.bat are displayed in the B.txt.

5.pause>nul allows the command line to be paused without any display or storage

6 . Batch command if you want to implement the delay between commands and commands , there are several ways to do this:

(1) Using the existing ping command to send the request mechanism to achieve the delay: Ping 127.1-n 5>nul can achieve a 5 second delay in the month

(2, using sleep in VBS to achieve

@echo off

echo Wscript.Sleep wscript.arguments (0) * 1000>delay.vbs

Delay.vbs 2

Del Delay.vbs Echo ok!

(3, http://www.jb51.net/article/18055.htm

Command line Learning Backup

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.