none
UnZip task

    Dotaz

  • Hi,

    i am a beginner for SSIS

    I have a zip file containing 60 zip files. Each of these 60 zip files have CSV files. I need to unzip these files

    can anyone help me to solve this issue with execute process task

    I have used a execute process task within foreach container , it is prompting me to select files but it should not show any prompts 

    pátek 18. května 2018 5:35

Všechny reakce

  • There's no need to use execute process task for this

    You can have a for each loop to loop through the zip files

    Then inside have a script task to call J# functions to unzip the files as per below

    http://microsoft-ssis.blogspot.ae/2011/01/unzip-files-with-ssis.html

    Having execute process task requires you to install third party programs to the zipping unzipping


    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    ----------------------------
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

    pátek 18. května 2018 7:38
  • Hi Margarete

    You can use the Process Task with this values in Expressions. I use 7zip program:

    Arguments:

    "x "+ @[User::strDirectory]  +" -o"+     @[User::strDirectoryEnd]

    @[User::strDirectory] = Directory with zip files

    @[User::strDirectoryEnd] = Directory where the extracted files will stay

    Executable:

    Directory with .exe to unzip (Ex: 7zip.exe)

    The Process Task has a property called WindowStyle. Select Hidden option.

    pátek 18. května 2018 18:45
  • Hi Margarate,

    Please see below reference link and it matches with your requirement to UnZip files using 7z.exe with Execute Process Task.

    http://www.techbrothersit.com/2013/12/ssis-how-to-unzip-zip-files-in-ssis-how.html

    Hope this helps!

    Thanks,

    Alambir

    Please vote this as helpful or Mark this as Answered if this helps


    Thanks, Alambir Please vote this as helpful or Mark as answered if this helps!

    pátek 18. května 2018 19:22
  • Hi Magarate,

    You need to use a Execute Process Task to unzip the parent zip file, then get all child zip files in one folder, then connect to a For each Loop container combined with another Execute Process Task to extract all csv files.

    Assume you have a parent zip file named test.zip located in E:\ZipFiles\test.zip, the design of package should be like.

    Regards,

    Pirlo Zhang


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    pondělí 21. května 2018 2:26
    Moderátor
  • i have changed window style to hidden option but it did not work
    pondělí 21. května 2018 6:46
  • Hi Margarate,

    Do you follow my steps?

    I tested on my environment, it should work.

    What's your error message you got?

    Regards,

    Pirlo Zhang 


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    pondělí 21. května 2018 6:48
    Moderátor
  • yes, i am able to execute the task but it is prompting me to select the folder that i want to extract and also destination every time for each loop.

    pondělí 21. května 2018 7:59
  • yes, i am able to execute the task but it is prompting me to select the folder that i want to extract and also destination every time for each loop.

    Which method are you following and where's it prompting you for the values?

    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    ----------------------------
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

    pondělí 21. května 2018 8:19
  • i used execute process task with for each file enumerator and when i execute the task a window is showing up to select the parent file that i want to extract and even for the child zip folders,And also the extract files to path 

    pondělí 21. května 2018 10:03
  • i used execute process task with for each file enumerator and when i execute the task a window is showing up to select the parent file that i want to extract and even for the child zip folders,And also the extract files to path 

    I think you're using interactive mode of the exe

    I'm not sure what exe you're using. Some of them have a command line utility which doesn't ask for prompts and have switches to pass the arguments

    Even the J# method I posted earlier doesnt require any exes and does the job using native functions.


    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    ----------------------------
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

    pondělí 21. května 2018 10:32
  • Margarete,

    In Arguments, you have 2 variables: Where files are and destiny this files

    

    pondělí 21. května 2018 14:58
  • Hi Marharate,

    Which tool did you use to unzip the files? 

    I specified the 7zG.exe as executable.

    Regards,

    Pirlo Zhang 


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    úterý 22. května 2018 8:26
    Moderátor