SysCommand with spaces in path?

 2 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
George Graham
Veteran Member
Posts: 201
Veteran Member
    I have a command that i want to execute from SysCommand (windows server) hat references a unc path with spaces in it. I cant just surround the path with quotes because the syscommand executes this:

    su -p ***** domain\USER -c "cmd.exe /C xxx" where xxx is my command

    ive tried all different methods but cant seem to make it work. I've tried double quotes, single quotes, prefixing the quote with slash and backslash, etc

    my work around is a fileaccess node to write my command to my own bat/cmd file and the call that file i just wrote but i would rather not do that.

    thoughts?
    Shane Jones
    Veteran Member
    Posts: 460
    Veteran Member
      Clever work-around.... I like when someone finds a creative way to work-around something that does not work the way it should.

      Have you tried using %20 in place of the space.... I am thinking that since a URL would work with %20 in place of a space you might be able to do the same thing with a UNC path. Might be worth a try?
      Shane Jones
      Tools: HR, Payroll, Benefits, PFI, Smart Office, BSI, Portal and Self-Service
      Systems: Lawson, Open Hire, Kronos, Crystal Reporting, SumTotal Learning
      ** Teach others to fish...
      Rob Conrad
      Veteran Member
      Posts: 73
      Veteran Member
        George -

        You might take a look at the way System Command executes your command - I ran into similar issues running a .bat script. Once I chose the "run program directly (no shell options)" selection under Execution Mode it worked nicely - you can see this on my Papervision flows A-D on TEST... :-). It looks like the script you have up there is trying to do a 'sudo' or account for Unix, I just got rid of all that and it works fine. I haven't tried \\BANDIT directories yet, but should get to that later today. See you here next week :-).

        RC