I'm setting up Jenkins on Windows to take care of the builds for a Windows project I've been working on. Until now, I've just been building locally. I've got a batch file that performs the build, which ends up generating some msi installers.
Some of the projects contain post builds steps that run batch files. The arguments to the batch files sometimes contain spaces. This isn't a problem when I run my build batch file from the command prompt.
However, Jenkins seems to have a problem with this - I get errors such as
"File not found: C:\Program"
I'm puzzled as to why the error happens when Jenkins triggers the batch, but not when I run it manually - any ideas?
For arguments that include spaces, wrap them in double quotes. Example:
WRONG: PROCESS_FILE.EXE C:\Program Files\This File.txt
CORRECT: PROCESS_FILE.EXE "C:\Program FIles\This File.txt"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With