Pergunta

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%"
Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top