Execute Process Task for unzipping files completes task but raises error

  • Inside a For Each Loop container I've got an Execute Process Task unzipping files using 7zip.exe. It's doing what it's supposed to: going to source folder full of zipped files, taking all the ones with format YYYY-MM-DD_24632*.txt.zip and unzipping them to destination folder. Yet, it goes red and throws error at the end:

    Error:

    [Execute Process Task] Error: In Executing "C:\Program Files\7-Zip\7z.exe" "e C:\Users\Downloads\MarinZipped -oC:\Users\Downloads\test2" at "",

    The process exit code was "2" while the expected was "0".

    The foreach loop container is green, the execute process task is red.

    I don't know where to set breakpoints on the execute process task for them to be helpful and am still in middle of trying to use them to benefit the troubleshooting.

    In the meantime does anyone have some ideas what could be causing error even though all files are getting unzipped?

  • Exit code 2 is a fatal error in 7zip, but that doesn't tell us much really.

    Have you tried outdirecting the command? Something like

    7zip.exe parms > mylog.txt

    See if that will she'd any light on the true error.

    Steve.

  • Oh, and make sure you're using the cmdline version, which I think is 7za.exe.

    Steve.

  • stevefromOZ (1/4/2015)


    Exit code 2 is a fatal error in 7zip, but that doesn't tell us much really.

    Have you tried outdirecting the command? Something like

    7zip.exe parms > mylog.txt

    See if that will she'd any light on the true error.

    First, use: 7zip.exe parms >> mylog.txt. The single > will overwrite the previous output.

    Second, for reference:

    http://sevenzip.sourceforge.jp/chm/cmdline/exit_codes.htm

  • ok, thanks. that gives me some new angles ie. redirecting to log and using 7za.exe instead of 7z.exe. So, 7za.exe is important? As is the unzipping is happening from command line. In fact, during the execution, command window pops up and shows which files it is in the middle of extracting.

  • the only available 7z for command line is for 32-bit

    http://7-zip.org/download.html

    I have 64 bit system. Does it matter?

  • I'm having issues unzipping .gz files with 7zip, myself. I didn't realize that 7za.exe was something to look out for? I'm using 64-bit system as well. Hhhhmmmmmm....i'll try this and let you know what I find out.

  • I have fumbled around with this and reverted to an older package that used 7zip.exe....and restarted development forward. This approach 'resolved' this particular problem which was preventing overall progress on my ssis development without actually finding out cause. It's one of those things where I don't know what fixed the problem, but it wasn't 7zip.exe that was issue.

  • Excellent for you. I ended up going outside of SSIS in general and doing the extraction with Powershell which gave me no problems.

    I just don't get SSIS.

  • This error in my case turned out to result from a lack of disk space available on the output device. Granted, I did not discover the answer until I ran the GUI version of 7-zip. The command line and logging also were no help. (No log file got created, presumably because there was no disk space, but the output in the cmd window simply stated "Command Line Error: Unsupported command:" Let's not be so quick to condemn a useful tool.

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply