Created
December 15, 2016 06:19
-
-
Save tdmitch/e69e399af29dc25ecb64d5a0b2bd4015 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Store the SSIS variables in local C# variables | |
string exeName = Dts.Variables["$Package::pPathTo7zip"].Value.ToString(); | |
string src = Dts.Variables["$Package::pSource"].Value.ToString(); | |
string dst = Dts.Variables["$Package::pDest"].Value.ToString(); | |
// Create args string | |
string args = " -y"; // Answer Y to any prompt | |
args += " a"; // Create archive | |
args += " " + "\"" + dst + "\" \"" + src + "\""; // Source and dest | |
// Variable to capture exception message if any | |
string exceptionTxt = ""; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment