unziping a file

  • noob question. anyone know the sql code for unzipping a file to specific folder?

     

    Thanks in advance

  • Along with what I've said here: http://qa.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=357553

    Create an 'Execute Process' task in your package and call the command line command to unzip your file. 

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • I use pkunzip in one of my job step to unzip compressed file to a location.  I also have the job saved as batch file.  You can execute the batch file as Operating system command (cmdexex) or you can use xp_cmdshell to execute the command. When command below is executed it unzips the webdb.zip file to d:\Mssql\tmp folder.  The command line syntax depends on the command you use to uncompress the zip file. 

    D:\MSSQL\Batch\pkunzip.exe -o D:\MSSQL\Tmp\webdb.zip D:\MSSQL\Tmp\

Viewing 3 posts - 1 through 2 (of 2 total)

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