打开文件夹
1 | start F:/Folder/ |
设置变量
注意在设置变量时不要在变量名和变量值直接加空格,SET foo = bar
是错误的,应该是 SET foo=bar
。
1 | echo off |
The /A
switch supports arthimetic operations during assigments. This is a useful tool if you need to validated that user input is a numerical value.
1 | SET /A four=2+2 |
注释
REM
或者 ::
都可以注释!
1 | REM this is a comment! |