Search code examples
filebatch-filecmdgraphicsmagick

Escape comma in batch file to execute a graphicsmagick command


I've got the line gm -mogrify -level 30%,10,100% Edit.jpg in a .bat file that executes perfectly when I type it manually. However, it ends the line on the first comma of the argument when executed as a batch script.

How should I rewrite this to make it work?

Thank you.


Solution

  • % is a special character in batch script. Use %% instead.