DOS symbol Problems

Source: Internet
Author: User

During the process of learning dos, I found that many people use unused symbols when looking at some examples, and there are many changes. Sometimes the commands are understood, and the symbols are stuck here, can you explain these symbols in a centralized manner. hope you can have a better chance, or help me find a place to learn .. thank you ..

The following is a reply to your topic. It is also a summary of the role of the characters you encounter in the batch processing process ..
  
In the summary below, my abilities and experience are limited, so mistakes or omissions may inevitably occur. If you have any problems, you are welcome to criticize and correct them. the content below is not comprehensive, so I will try again later...

[Note]: // The following content is a comment.

_______________________________________________________________

@
// Hide the command display in the CMD window when executing the command;

~
// Variable extension function. For example, if a variable % I indicates a file name, then % ~ FI can be used to extend the variable to the complete path of the file;

%
// Reference the variable value. For example, a % time % can be extended to the current system time;

^
// Escape characters. it is better to display some special characters on the screen, such as >>| ^, and so on, you can add a ^ symbol before it to display the characters after this ^, ^ indicates displaying a ^, ^ | indicates displaying a | character;

&
// Command connection character. for example, if you want to execute two commands simultaneously on a line of text, you can use the & command to connect the two commands. for example, if you view the user of a computer and the IP address of the local machine, you can write "Net user & ipconfig" on a line ";

*
// Represents any character, which is commonly referred to as "wildcard". For example, to find all the character files (.txt) in the C directory, you can enter the command "dir C :/*. TXT "; ① * can also represent multiplication operators, such as" set/A x = 4*2 ". The result is:" 8 ".

()
// The command contains or has a priority identifier. For example, if the for Command needs to use this (), we can also see it in commands such as if and ECHO;

-
// Range identifier, such as date search, which can be used in the tokens operation in the for command;

+
// It is mainly used in the Copy command, indicating that this + character is required to merge many files into one file; ① It can also be used as an addition to arithmetic operations.

|
// MPs queue. the output of the previous command is used as the input of the next command. "DIR/a/B | more" can display the information output by the Dir command on screen;

:
// Tag locator, which can receive the tag pointed to by the Goto command. for example, a ": Begin" tag is defined in the batch processing file. You can use the "Goto begin" command to go to ": Begin" to execute the batch processing command after the change.

""
// Delimiter. "" is often used to specify a path for a path with spaces. "" is also required in some commands;

/
// Parameter expression, which can also represent division in an arithmetic expression. For example, "DIR/S/B/a-d" indicates different parameters specified by the "dir" command;

>>><
// All are command redirection characters. You can redirect the output or display characters of a command to a new device or file. for example, you can use "dir> lxmxn.txt" to output the result of the "dir" command to the "lxmxn.txt" text file.

① Success -----------------------------------------------------------------------------------
=
// Assign a value. It is used to assign values to variables. For example, "set a = Windows" means to assign the "Windows" string to the variable ""; it can also be used with arithmetic operations, such as "set/A x = 5-6*5 ".

② Success -----------------------------------------------------------------------------------
/
// This "/" symbol indicates the root directory of the current path in some cases. for example, if the current directory is in C:/Windows/system32, "DIR/" is equivalent to "dir C :/"

.
// This "." indicates the current directory.

..
// Two vertices represent the upper-level directory of the current directory. for example, if the current directory is under "C:/Windows/system32/", then "CD .. you can set the current directory to "C:/Windows /".

&&
// Connect two commands. When the & command is successful, the & command is executed.

|
// Connect two commands. This command is executed only when | the previous command fails. | the subsequent command.

$
// What I know now is that the findstr command indicates the end of the line.

________________________________________________________________
  
I have written so much today. I will try again later ..

①: Additional information was provided at 2006.10.30.
②: Supplementary information was provided at 2006.11.08.

[Last edited by lxmxn on 2006-12-8 at PM]

 

Original address: http://www.cn-dos.net/forum/viewthread.php? Tid = 24289 & fpage = 1

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.