I want to create a .bat file which gets the filename and processes a command like: make.bat <filename>. The .bat file must accept the command in following format:

"gcc -ggdb3 -O0 -std=c99 -Wall -Werror %filename% -lcs59 -lm -o %filename%"
有帮助吗?

解决方案

If you mean, "how do I take command line arguments to a batch file I'm writing", you probably want %1 for the first argument, %2 for the second, and so forth. A good page explaining this is here. Many other batch file concepts are also well explained on that site.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top