March 21, 2012 at 6:47 am
I'm trying to use the Execute Process task to unzip a file (using command line call to 7Zip). The syntax I need to get to is something like this:
"C:\Program Files\7-Zip\7z.exe" e -aoa "E:\SSIS\Filename.zip"
Now if I try to recreate that in the EP task, I can set the Executable property to
C:\Program Files\7-Zip\7z.exe
and the Arguments property (via an Expression):
" e -aoa " + @[User::FileName]
(and I've tried many other combinations of escaped double quotes...)
Regardless of what I do, SSIS helpfully adds a set of double quotes around the entire 'Arguments' expression at runtime, which fails with a syntax error because the
e -aoa
bit needs to run without quotes. Someone else must have cracked this one - all help appreciated, thanks.
March 22, 2012 at 1:15 am
Just guessing here, but what if you store e -aoa in a variable?
So your arguments expression is:
@[User::Arguments] + @[User::FileName]
Otherwise, whip out the plain old script task. 🙂
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
March 22, 2012 at 3:13 am
Koen Verbeeck (3/22/2012)
Just guessing here, but what if you store e -aoa in a variable?So your arguments expression is:
@[User::Arguments] + @[User::FileName]
Otherwise, whip out the plain old script task. 🙂
Thanks for responding - thought it was going to be a tumble-weed post 🙂
I tried that - it just seems that the EP task tries to run
"process exe" "process arguments"
regardless of how the arguments are derived.
What puzzles me (and made me persist for perhaps too long) is that there are examples out there of people who seem to have made this work. Perhaps this is a 2008 feature.
I have already done as you suggested and gone down the J# / script route - this seems to work OK.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply