Calling batch files with spaces in the name

This is a bit interesting, at least - if your batch file has spaces in the name, you need two double quotes at each end in order to run it:

The parameter needs to be""My Batch File.bat"" rather than "My File.bat" or even my file.bat

 

Can we count this as a bug, at least we should get a warning or hint that filenames with spaces need to be treated specially?

 

thanks

Moz

 

Hi Moz,

That’s a bug. Thanks for reporting it. Are you using the Run DOS Command action to run the batch file?

Regards,

Angus

yes, run DOS command with ““my batch file.bat”” as the command and a “start in” directory specified. I’m also having to say “program exit code must me 0” which I’d like to see as the default. But that’s a “wish list” not a bug.

Hi Moz,

The latest FB 5 test build will run multi-word batch files properly. It will only work if you’re not passing any command line arguments to the file. If you’re passing arguments, you’ll need to do the quoting manually (or not have spaces in the batch file name.)

You can get the build here: https://www.finalbuilder.com/downloads/finalbuilder/550/FB550_265.exe

Regards,

Angus

PS The “program exit code must be” function is turned off by default because, despite the fact that 90% of Windows programs respect the zero-as-success model of exit codes, 10% do not.

Cool. Thanks heaps for that, the usual very fast turn-around on bugs is great!

 

As for the program exit code... there's always one

How about an option to set that “exit code must be 0” as default? I’ve been caught a couple of times.

Steve