Leave feedback
  • Question

    How to add quot (") in execute script

Enter a new topic
  • loke kk loke kk
    0 likes 389 views

    Hi,

    How can I add double quote inside the execute script so that I can pass the value with space?

     

    example:- 

    execute("cmd.exe /c "D:\ABC DEF\programA.exe" "test with space" "test with space" ", 120, "", $outarr);

     

    Any suggestion?

     

    thank you.

     

    Wednesday 10 August, 2016
  • Best Answer
    Vyv Lomax Vyv Lomax Administrator
    0 likes

    Try:

    execute("cmd.exe /c <22>D:\ABC DEF\programA.exe<22> <22>test with space<22> <22>test with space<22> ", 120, "", $outarr);

    Wednesday 10 August, 2016
  • loke kk loke kk
    0 likes

    Ya, the <22> can use at the execute scripting but i need remove the "cmd.exe /c". It will cause an error as below:-

    0810 190604 (0463) 3 execute: Start executing of an external command: "cmd.exe /c "D:\BTMU_EDMS\Resources\EncryptPassword\AddPassword.exe" "D:\Source\A.pdf" "D:\EncryptPassword\PDF Test\encrypt123.pdf" "123456"" (procID=3588, timeout=120)
    0810 190604 (0464) 3 execute: External command has been executed: "cmd.exe /c "D:\BTMU_EDMS\Resources\EncryptPassword\AddPassword.exe" "D:\Source\A.pdf" "D:\EncryptPassword\PDF Test\encrypt123.pdf" "123456"" (procID=3588, returned=1)
    0810 190604 (1155) 0 ========================No Email Send=============================
    0810 190604 (1155) 0 ========================External Program Error=============================
    0810 190604 (1155) 0 ========================Output=============================
    0810 190604 (1155) 0 ========================Error=============================The filename, directory name, or volume label syntax is incorrect.

    0810 190604 (1155) 0 ========================ExitCode=============================1

    Wednesday 10 August, 2016