How to Run .Bat File From SSIS


I have a bat file to use Robocopy to move files. I setup a schedule with the native windwons scheduler and it worked pretty well. Howerver, I ran into an issue with clustering for synchronize both machines for the schedule in case of a failover. I dedcided to move the schdule to run an SSIS package.

Here are a few simple settings to setup the SSIS package to run a .bat file which includes my Robocopy command.

The key part is to use an Execute Process Task with the following settings for the simple package:

Within  Execute Process Task Editor and under Process to fill in the following:

Executable: X:\myfolder\mybatfilename.bat

Arguments: ..\bat

WorkingDirectory: X:\myfolder

Advertisements

3 Comments on “How to Run .Bat File From SSIS”

  1. Jayesh says:

    Thanks a lot its working now for me

  2. harishreddy says:

    Yes it worked for me to.

    Thanks,

  3. drk2cmp says:

    Thanks for the post! I couldn’t get my batch to execute, but your technique worked.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s