January 13, 2009 at 5:18 pm
I have an SSIS package that is going to be extracting zipped files, so my question is does anyone know how to extract a zipped file with winrar using the command line? I am able to do this with rar files, but when I when I try to do it with zipped files I get a message that the file is not a winrar archived file. I tried using winzip but I have the trial version so everytime the command gets executed in SSIS the registration screen pops up and now I have to manually enter the location of where I want to extract the data to.
January 13, 2009 at 9:15 pm
I haven't worked with WinRAR, but I've done quite a bit of work with WinZip to automate zipping and unzipping files with SSIS. With the latter, the command line functionality is actually contained in a different executable, so you may need to call a different .exe file than you would normally use for interactive zip and unzip operations. The documentation for WinRAR should be helpful to find out exactly how to do this.
hth,
Tim
Tim Mitchell, Microsoft Data Platform MVP
Data Warehouse and ETL Consultant
TimMitchell.net | @Tim_Mitchell | Tyleris.com
ETL Best Practices
January 13, 2009 at 10:01 pm
try using 7-zip, they have a cmd line version 7za.exe that comes with the download, which is free to distribute (no $ amt for it). It works great, I use it from my SSIS packages all the time.
January 14, 2009 at 4:45 am
Just use execute process task. Open Process, then in executable make path to winrar.exe.
In arguments make path to zip file. (for ex. -e c:\temp\file_name.zip).
In working directory make c:\temp
Or, you can user unrar.exe and batch file.
January 16, 2009 at 3:24 pm
I went with 7-zip because I couldn't get find the command line executable for winzip so the evaluation screen wont pop up (I tried all .exe files in the winzip folder) and winrar like I mentioned in my post wouldn't extract the files because its not a winrar archive. I would like to give everyone my gratitude for their help.
December 14, 2009 at 2:55 pm
so far i have found this thread extremely informative. i will look at 7z as i have recently downloaded 7za.exe to use with my script ftp software. i will post up the results once i have tested a few things. thanks again for the info
December 14, 2009 at 3:59 pm
[font="Comic Sans MS"]
Yes - using 7zip is very much convenient it's not only free and saves $$ - it supports large number of archive extensions and have some cool compression methodologies to create a super-compressed file...
[/font]
[font="Comic Sans MS"]--
Sabya[/font]
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply