Batch Processing literacy

Source: Internet
Author: User

Recently, I became more and more familiar with batch processing. I think that when I first came into contact with batch processing a year ago, I was completely unfamiliar with the concept of "Baidu" and "Google" on the Internet. Now we will summarize the collected materials. It can be said that this is written for cainiao who do not fully understand batch processing. At Jinling.

1. Batch Processing definition:

Is to set a series of commands in a certain order as an executable text file with the extension bat or cmd (the suffix name has the same case effect ).

2. Create:

Create a TXT file and directly change the suffix to bat or cmd. As for the content, you can either write it in the TXT file, and then change the suffix name. You can also change the suffix name, right-click it, and select Edit to write it.

3. Run:

Double-click the bat or CMD file, or right-click the file ----> open ". The premise is that the batchcompute command has been written in the BAT (/CMD) file and is correct and syntactically compliant.

4. commands and Syntax:

4.1 notes ---- REM and ::

It is equivalent to/**/in C language. It is generally used to annotate the author, time, and function of a program, for example, 2012.12.05;

4.2 pause ----- pause

When the pause command is run, the following message is displayed:

Press any key to continue... (after hitting any key, continue)

4.3 echo

Echo + Information Content ------ output prompt information, such as Hello world displayed on the screen after the echo Hello world command is executed;

@ Echo off ------ commands such as copy and delete after this command are not displayed on the screen during execution;

4.4 File Operations

Copy ----- copy, for example, copy "D: \ 123.txt"" C: \ WINDOWS \ "to copy the 123.txt file under the D Drive to the C: \ Windows folder (the preceding file is 123.txt). Note that the path contains quotation marks)

Delete ------ del, for example, the Del "D: \ 123.txt" statement deletes the 123.txt file under the D Drive. In addition, the delete operation is completely deleted, and does not go to the recycling site. (The above mentioned is that the 123.txt file exists)

Move ------ move, for example, move "D: \ 123.txt"" C: \ WINDOWS \ ". The statement is to move 123.txt under the D Drive to the C: \ windows;;(( the above mentioned is the 123.txt file)

Window 4.5

Title ----- title, such as title Haha, implements that the title of the pop-up window is "Haha", no longer the default "C: \ windows \ system32 \ cmd.exe ";

Color ---- color: Set the font color of the pop-up window, such as color 6. The font color is yellow (the color corresponding to 6 is yellow );

Relationship between colors and numbers: 0 = black 8 = gray
1 = blue 9 = light blue 2
= Green A = light green

3 = lake blue B = light green
4 = red C = light red
5 = purple

D = lavender 6 = yellow
E = pale yellow 7 = white F = bright white

4.6 call

The call command can call another batch during batch processing. After another batch is executed, the original batch processing will continue. You can write two simple BAT file labs!

The last one I learned a few days ago was appended to the rundll32.exe setupapi for the INF file to install the driver. DLL, installhinfsection defaultinstall 132 c: \ windows \ test. INF (the last part is the path to store the driver file)

 

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.