How do I run a batch file stored on one server from another?

  • I have BIDS running on my local machine, but am trying to create a package that will be posted on the Integration Services of my production server. In my package, I wanted to run a batch file that is stored on my Production server, but I can't figure out how to get it done. The data flows create 2 files and store them on the production server. The rename.bat file is supposed to rename the two files to include a timestamp and then the ForEach container/FTP Task combo is to take a copy of one of these files and upload it to another server in a different location.

    I can get this all done when I have the rename.bat locally on my machine, but now that I'm trying to modify the package to work on the production server I can't get the rename.bat to work! I have put a copy of the rename.bat in the identical folder on the production server, but again, I'm running the BIDS locally, so the Execute Process Task runs the remote rename.bat as though it was on my local machine, and doesn't rename the files that are created on my production server.

    How can I get this done? Thanks for all the help! 🙂

  • Why don't you simply use the RenameFile option of the FileSystem task?

    I don't see any reason to call a .bat file to do it...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • Sounds interesting... but can I use that to rename with a timestamp? How would I do that?

    That would definitely ease my troubles....

  • bajanpoet (11/25/2010)


    Sounds interesting... but can I use that to rename with a timestamp? How would I do that?

    That would definitely ease my troubles....

    I'm sure this link will help you to resolve the issue.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • Thanks. You got me looking in another direction, and I've decided to use expressions to build the filenames with the timestamp at the beginning and so eliminate the rename step all together 🙂 I'm still fairly new to SSIS, and didn't know how much ways there are to achieve the same objective.

    Thanks again!

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply