Page 1 of 1

pass quotes in Execute command activity

Posted: Fri Oct 25, 2013 12:42 am
by dsusersaj
I need to execute a unix command as follows

winexe -U 'Abcd\user%passwd!' //ATL0sp-WAG001 "D:\Enterprise_Data Warehouse\Batch Programs\Test.bat"

From execute command activity, I see that the command being sent is

winexe -U Abcd\user%passwd! //ATL0sp-WAG001 D:\Enterprise_Data Warehouse\Batch Programs\Test.bat

As the quotes are lost, the path is not getting recognized.

Any option to pass path with spaces and also quotes around Abcd\user%passwd!?

Thanks,

Posted: Fri Oct 25, 2013 8:41 am
by asorrell
Try enclosing the Path string in another set of single quotes,

'"D:\Enterprise_Data Warehouse\Batch Programs\Test.bat"'

I can't actually try that at the moment to confirm, but I think that will fix the problem.

Posted: Fri Oct 25, 2013 11:59 am
by dsusersaj
I tried it and it didn't work.

Any other ideas?

Posted: Fri Oct 25, 2013 12:17 pm
by asorrell
Put it in a shell script and execute the shell script instead?

Posted: Fri Oct 25, 2013 12:56 pm
by chulett
Play around... try various methods to escape the quotes. Perhaps a backslash, or try wrapping each quote in a pair of quotes.

Posted: Tue Oct 29, 2013 12:08 pm
by dsusersaj
chulett wrote:Play around... try various methods to escape the quotes. Perhaps a backslash, or try wrapping each quote in a pair of quotes.
I have exhausted all combinations of passing quotes around the windows path .

None is working.

Any ideas?.

Posted: Tue Oct 29, 2013 2:01 pm
by ray.wurlod
Use the 8dot3 name so that you don't have to have spaces in the pathname.