create cmd shortcut setting up environment
If you ever installed software like Visual Studio or Qt, you will find some cmd shortcuts in the start menu. For example, for VS, there are several cmd shortcuts in […]
If you ever installed software like Visual Studio or Qt, you will find some cmd shortcuts in the start menu. For example, for VS, there are several cmd shortcuts in […]
Percent symbols are confusing in Windows bat scripts because they are designed with different meanings in different situations. The most occurrences of percent symbols are like %xxx%, where xxx is […]
You can invoke another batch script from a batch script like this: rem a.bat echo helloa1 b.bat echo helloa2 rem b.bat echo hellob1 exit /b echo hellob2 Here, the batch script a.bat […]
Which command is a useful tool in Linux. If you run a command by just typing its name instead of the full path name, the shell will find the command […]
Tilde is an interesting symbol in windows batch script. You may have seen %~0. The tilde before the digit (which means the command name) does something special to the parameter. […]
The syntax of for loop in Windows bat file is a little strange. If you are familiar with for loop in other programming languages, you may write the following code: […]
You may see this code in a windows bat script. You may think this command enables command extensions and delayed variable expansion. But this command actually have 3 effects: set […]
You must be familiar with the exit command. If you execute this command in a DOS window, the DOS window closes and the cmd process exits. This is like closing […]
It seems both can get the current directory. What is the difference between %~dp0 and %CD%, then? First, %~dp0 can only be used in bat file while %CD% can be […]
In windows bat file, %0, %1,…, %9 are the first, second, …, tenth parameter of the command line. The first parameter is the command itself. Suppose the bat file is […]