0

I am using the following code to zip a text file by using Cygwin. master.dbo.xp_cmdshell 'c:\apps\cygwin\bin\zip.exe -j "D:\ZipMe\TestZip\subdir1\random.zip" "D:\ZipMe\TestZip\subdir1\random.text"'

Now the problem is with the result that random.zip file also include the parent directories information. This code is working fine with old version but gave me odd result the verison ZIP 3.0. Please help me out there.

1
  • the -j command is what strips the paths, if you are already using it and it is not working, i do not know Mar 31, 2015 at 7:55

1 Answer 1

0

In some version of Cygwin the Zip command has bug a which cause the -j option fail when Win32 paths are specified, So convert to POSIX paths and try this code... c:\apps\cygwin\bin\zip.exe -j "/cygdrive/d/ZipMe/TestZip/subdir1/random.zip" "/cygdrive/d/ZipMe/TestZip/subdir1/random.text". Thanks.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .