This is a real quickie but it cost me dearly this weekend. My task was to call 7-zip from within SSIS and extract the contents.
Here’s the basic example that’s all over the Internet:
7z e archive.zip -oC:\Doc
Where:
7z is the executable
e is the argument to perform an extract
archive.zip is the file to be opened and extracted
-o is to extract the output to and
C:\Doc is the extract directory
I’m not much of a DOS command line type but I do have a fair amount of UNIX, Linux, BSD experience. I’ve used all the tools in the unix space including but not limited to PERL, grep, awk, sed, vi, … It turns out this experience may have worked against me.
I have never seen a situation where if an argument has no white space between it and the argument value it breaks the command parser.
Bottom line, with 7-zip –o C:\Doc will generate a command line error while -oC:\Doc (no space between “o” ane “C”) works fine.
When it comes to T-SQL I tend to use lots of white space. Those habits do not necessarily have a positive carryover to 7-Zip.
Happy SQL-ing!
Leave a Reply
Using Gravatars in the comments - get your own and be recognized!
XHTML: These are some of the tags you can use:
<a href=""> <b> <blockquote> <code> <em> <i> <strike> <strong>