I'm trying to use tSystem in TOS 3.1.3 within a java project running on Linux in order to call a command line utility from VMWare: tSystem Component Command: "/usr/bin/vmrun -T server -h https://serverort/sdk -u username -p password -gu guestuser -gp guestpassword runProgramInGuest \" Virtual/virtual_file.vmx\" -activeWindow -interactive \"c:\\program files\\path\\program.exe\" /switch" The issue seems to be with the spaces within the quoted paths, starting with the one after \" Even though the double quotes are escaped, the tSystem command is broken at each space within the quoted string, just as though there were no quotes. This same command runs perfectly in a Perl project using double quotes without the escape. How might I deal with spaces properly? I thought that enclosing them in escaped double quotes would be sufficient. On run, the jobs errors with: Error: Cannot open VM: ", unknown file suffix which seems to indicate that the command is being split on the space.
I think the quickest route is to create a custom shell script that launch the commands you want and then call the script from tsystem ( the advange is that you don't need to change the talend job if you need to change the script ). tsystem in java uses api Runtime.exec that does split the argument string using spaces... bye