I am working on a JSFL script that will export WAV files and use lame.exe to encode them as MP3, via FLfile.runCommandLine. I can't figure out how to properly escape the spaces in the command linefor this to work.
var command_line = '"C:\pathWithSpaces in pathname\lame.exe" -option1 -option2 "C:\different pathWithSpaces\targetfile.wav" "C:\different pathWithSpaces\targetfile.mp3"' ;
FLfile.runCommandLine (command_line);
result in command window:
'C:\pathWithSpaces' is not reconginzed as an internal or external command, operable program or batch file.
I've tried replacing spaces with'%20' and with carrat-space'^ ', both fail. The var command_line is verified to work when cut and pasted manually into the command window, the spaces only seem to be an issue when run form within the JSFL script.
(simply removing spaces form any paths in the environment is not an option. The command_line var is dynamically generated, and must be able to cope with spaces to be useful to others.)