Hi,
I use Knime version 2.9.2. The external tool node (in Misc section of nodes) produces the following error message when a path to executable contains spaces.
External tool Node configuration:
Input file to external tool --> C:\Program Files (x86)\KNIME_TEMP\input.csv
Path to Executable --> C:\Program Files (x86)\KNIME_TEMP\test.bat
Execute in directory --> C:\Program Files (x86)\KNIME_TEMP
Output file from external tool --> C:\Program Files (x86)\KNIME_TEMP\output.csv
If I use these settings and try to run the node I get the following error message:
ERROR CommandExecution Execution failed (with exception): Cannot run program "C:\Program" (in directory "C:\Program Files (x86)\KNIME_TEMP"): CreateProcess error=193, %1 is not a valid Win32 application
ERROR External Tool Execute failed: Cannot run program "C:\Program" (in directory "C:\Program Files (x86)\KNIME_TEMP"): CreateProcess error=193, %1 is not a valid Win32 application
Everything seems to work fine as soon as there no spaces in the "path to executable" option. For example, if I specify Path to Executable as C:\KNIME_TEMP\test.bat
(I created a new folder on C drive and copied test.bat there), then there are no problems in running External tool node (Please note that all other setting remained the same, i.e. with the paths C:\Program Files (x86)\KNIME_TEMP)
I also tried to work around the problem and include quotes in the path to executable, e.g.:
C:\"Program Files (x86)"\KNIME_TEMP\test.bat
"C:\Program Files (x86)\KNIME_TEMP\test.bat"
C:\Program%20Files%20 (x86)\KNIME_TEMP\test.bat
'C:\Program Files (x86)\KNIME_TEMP\test.bat'
C:\'Program Files (x86)'\KNIME_TEMP\test.bat
and alike.
In every case I get another error message:
Invalid settings:
The specified external executable (C:\"Program Files (x86)"\KNIME_TEMP\test.bat) doesn't exist!
Does anyone have any ideas how to deal with paths which contain spaces in the "Path to Executable" option? The ideas such as: "Don't use spaces" are not accepted.
I would very much appreciate your replies.
Best,
/Aleksejs