Created
January 23, 2016 13:35
-
-
Save anonymous/f52109bfd121bac94843 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
public void Main() | |
{ | |
// Create a new Process object to execute WinSCP | |
Process winscp = new Process(); | |
// Set the executable path and download directory | |
winscp.StartInfo.FileName = Dts.Variables["$Package::pWinSCPLocation"].Value.ToString(); | |
winscp.StartInfo.WorkingDirectory = Dts.Variables["$Package::pDownloadDir"].Value.ToString(); | |
// Set static execution options (these should not need to change) | |
winscp.StartInfo.UseShellExecute = false; | |
winscp.StartInfo.RedirectStandardInput = true; | |
winscp.StartInfo.RedirectStandardOutput = true; | |
winscp.StartInfo.CreateNoWindow = true; | |
// Set session options | |
string sessionOptionString = "option batch abort" + System.Environment.NewLine + "option confirm off"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment