Command line to unzip file using winzip32

  • You need to put double quotes around the filename, like this: "C:\Information technology\Dral\Dral_ENC.zip"

  • I am not sure how to pass the command line .I am using windows 2003 server, and winzip 8.1 version.I heard that this OS doesnt support command line to unzip the file of this version ......

  • Raghu,

    Replace your argument in Expression tab as

    "-e -o " + "\"" + @[User::fileName] + "\""

    Let me know your output. Keep your file path as original

  • Dude..

    I am facing someother prob

    When i use ("-e -o " + "\"" + @[User::fileName] + "\"") the code it is passing the file name with quotes but instead of

    C:\Information technology\Dral\Dral_ENC.zip .It is passing the file name with all caps i.e

    Invalid file name::C:\INFORMATION TECHNOLOGY\DRAL\DRAL_ENC.ZIP

    here it is identifying the spaces but it is changing all the letters into caps......

  • Could you post what exactly you have in your Execute Process Task and how you have set the variable.

    I would like to compare it with mine.

    A chick .....:D

  • In EXPRESSION i passed

    "-e -o " + "\""+ @[User::strSourceFileZip] +"\""

    this to set the path

    Here strSourceFileZip gets the string from script task.When i put Msbox in script task to look at the string before it passes to next.It showing the exact path.But when value comes to Execute process task the path is changing to all CAP letters

  • Does @[User::strSourceFileZip] refer to fullfilePath or just the fileName?

    What did you set for the working directory path ?

    Could you disable the Script Task, and store the file name to be passed in a variable and just try the Execute Process Task.This way we can figure out where the problem resides and the Execute Process Task actually works ?

  • When i pass

    U:\Information Technology\Dral\Doral_ENC_BMC_prod_20081112.zip as variable then it is working....But

    When i pass that path string from script task to variable .......and when i put that variable name in EXPRESSION in process task i am getting that error.......Suddenly the path is showing in all caps.

    Even i put Msgbox to find what string it is passing to the variable ...In msgbox its showing the exact path.......

  • Could you check how the variable looks like while its being paased from script task to execute process task using the Local Window ?

  • In Msgbox when i pass the string to variable it showing

    C:\Information Technology\Dral\Darl_ENC.Zip

    After completion of this task when it comes to procees execute task

    I am getting an error message

    Incorrect FilePath:C:\INFORMATION TECHNOLOGY\DRAL\DRAL_ENC.ZIP

  • Could you try to manually modify the variable that is being passed to ALL Caps and give a try with just the Execute Process Task enabled ?

    Im running out of ideas here....

  • Thanq very much man...for your help.......

    I am putting the string in the variable and passing it....Now my problem got resolved .......Once again thanq u very much for your help.........

  • You are welcome. It tought me a thing or two as well.

  • You don't necessarily need to use the winzip command line tool or anything else like that. If you do it in a script task, you can reference a library that can unzip files such as SharpZipLib (free). J# also has some classes that can do this so you may be able to use that. I believe there is also a commercial Zip Task specifically for SSIS floating around somewhere... so maybe look into that.

  • Remove -e and -o from the arguments leave just the name of the file to unzip

Viewing 15 posts - 16 through 30 (of 32 total)

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