BAT (batch file) first basic symbol

Source: Internet
Author: User

Recently, a software I used requires a large number of environment variables, and I do not want to add these variables to the system environment variables, on the one hand, because there are different versions of database files with the same name, they will interfere with each other when written in the system environment; on the other hand, most of the paths are only required in this software, therefore, it is most appropriate to use bat for processing.

BAT files are frequently used in windows, and they also have a set of syntax standards. below is what I think I need to know about bat, even if I cannot write these files, at least anyone else can understand it. This article first introduces the basic symbols, because when I first read bat

1. @ symbol

This symbol does not have any special meaning. It is generally used for the first position of a line only to make it not displayed in the command line when the modified line is running.

@ Echo on/off: equivalent to whether to output the command in the command line

2.% symbol

This symbol is usually used in pairs with variable names in the center, such as % Sam %. It is equivalent to a variable and is generally used to represent a string.

% I % (I is a parameter): used to represent command line parameters, such as test. Bat 'abc' 'bcd ';

For example, % ~ Dp0. This is a special expression referring to the current path.


3, Rem

This symbol indicates the meaning of the comment, which is equivalent to the // in C language. You can comment a line.


BAT (batch file) first basic symbol

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.