1

I have a ssis package that has a foreach loop container. I am trying to use .bat file within the foreach loop container using execute Process task. How do I configure my Execute Process task to pass the value into my .bat file?

Here is my sequence:
Execute sql task (passing my variable into the foreach)--> Foreach loop container----> Execute Process Task (I need help with executables, arguments....)

1 Answer 1

1
  • Create 2 variables in your SSIS package.
  • The first one would have the FileName along with the entire path.
  • The other variable will have its property 'Evaluate As Expression' set to TRUE and set its Expression to the following - "local:" + @[System::FilePathVariable] + " -d HDMS:/To_HDMS/"

As soon as the second variable is referenced in your SSIS package, its expression (the one written above) would execute.

Say the FilePathVariable had the value "D:\Folder1\Folder2\FileName"; so, the value of the second variable after its expression is evaluated would be "local:D:\Folder1\Folder2\FileName -d HDMS:/To_HDMS/"

You need to pass this as an argument to your batch file. This would be done as explained in my previous post above.

In your batch file, have the command as -

C: cd \Program Files\WS_FTP Pro\ wsftppro -s %1

Please try and let us know in case it doesn't work for you.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your feedback. Where will all this be in the Execute Process Task? Where will this variable be placed? Argument? I would appreciate a screen shot as well to demonstrate.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.