Topic
  • 3 replies
  • Latest Post - ‏2013-03-11T15:38:16Z by SystemAdmin
SystemAdmin
SystemAdmin
1316 Posts

Pinned topic Error in zip script

‏2013-03-08T18:45:10Z |
I have the following script

/*BEGIN_REQUESTER_COMMENTS
$PNODE$="NODE1" $PNODE_OS$="Windows"
$SNODE$="NODE2" $SNODE_OS$="Windows"
$OPTIONS$="WDOS"
END_REQUESTER_COMMENTS*/

ZIPPROC PROCESS
&File=""
&Name=""
&Path=""
&ZipFile="&Path&Name"
SNODE=NODE2
CRC=ON

DOZIP RUN TASK PNODE (PGM=Windows)
SYSOPTS="cmd(WinZip32) args(~"-a &ZipFile &File~")"

PEND

The task starts, and runs fine, with a file without spaces in the name. However, as soon as a file with spaces in the name, the process hangs on DOZIP. I read online the fix for file spaces using the above SYSOPTS syntax. I'm not sure if this is a problem with Winzip or something within in C:D. The trace contains the following:

03/08 11:28:23.731319 0000131C SM | | | | | | | | | | ARG 50 bytes of sysopts: cmd(WinZip32) args(""-a E:\test\Installing Connec

03/08 11:28:23.731319 0000131C SM > | | | | | | | | | | | sdms_run_task_program entered

03/08 11:28:23.731319 0000131C SM | | | | | | | | | | | CmdLine: "CMD.EXE" /C WinZip32 "-a E:\test\Installing ConnectDirect E:\test\Installing ConnectDirect.docx"

03/08 11:28:23.763319 0000131C SM | | | | | | | | | | | runjobtask_create_process() - user: jadam, Run Job dir: E:\npoess\apps\Sterling_Commerce\Connect Direct v4.6.00\Server\PROGRAM\, cmd line: "CMD.EXE" /C WinZip32 "-a E:\test\Installing ConnectDirect E:\test\Installing ConnectDirect.docx"

The first line concerns me, though the following lines seem ok.

Is there anything I should be doing differently or checking? Does anyone know if there is a setting in winzip that needs to be set first?

Also, we may be going to 7zip instead, which might not have this problem, but I haven't been able to test that yet.

Thanks!
Jason
Updated on 2013-03-11T15:38:16Z at 2013-03-11T15:38:16Z by SystemAdmin
  • VolkerFriedrich
    VolkerFriedrich
    156 Posts

    Re: Error in zip script

    ‏2013-03-11T08:33:01Z  
    I don't know the WinZip32.exe syntax, but I guess you may want to put double-quotes around each file name instead of putting them around the group of arguments.

    Try this:

    DOZIP RUN TASK PNODE (PGM=Windows)
    SYSOPTS="cmd(WinZip32) args(-a "&ZipFile" "&File")"
  • VolkerFriedrich
    VolkerFriedrich
    156 Posts

    Re: Error in zip script

    ‏2013-03-11T08:34:01Z  
    I don't know the WinZip32.exe syntax, but I guess you may want to put double-quotes around each file name instead of putting them around the group of arguments.

    Try this:

    
    DOZIP RUN TASK PNODE (PGM=Windows) SYSOPTS=
    "cmd(WinZip32) args(-a ~"&ZipFile~
    " ~"&File~
    ")"
    
  • SystemAdmin
    SystemAdmin
    1316 Posts

    Re: Error in zip script

    ‏2013-03-11T15:38:16Z  
    I don't know the WinZip32.exe syntax, but I guess you may want to put double-quotes around each file name instead of putting them around the group of arguments.

    Try this:

    <pre class="jive-pre"> DOZIP RUN TASK PNODE (PGM=Windows) SYSOPTS= "cmd(WinZip32) args(-a ~"&ZipFile~ " ~"&File~ ")" </pre>
    Will give that a try, thanks! I of course was told after posting this question that none of the files I'll be dealing with should include spaces in them because of prior issues all the different software products we use with spaces in folder and file names. So looks like it might be a non-issue to start with.

    Thanks!
    Jason