exec .dtsx and ant .xml

  • Hi Friends,

    I have 2 parts to my problem.... a dtsx package and an ant xml file.

    My dtsx package picks up files from a folder and loads into a staging table (files may be dropped off a regular basis into this folder)

    I have a dtsx package that I want to execute only when files are present. Or more specifically the second part, my xml file should only run when files actually have been loaded into the staging table.

    Any ideas how to accomplish this?

    My initial thought was to write a bat file, but I am not well versed in that area...Would that be a recommended path? Any suggestions or recommendations would be greatly appreciated.

    Thanks,

    ~Jay

  • It's been a while since I wrote this.

    But wanted to follow up and share what I got..

    @echo

    If Exist "C:\myProject\fileDrop\*.csv" (

    cd "C:\MypathToproject\Project\bin"

    dtexec /f load.dtsx

    cd "D:\MyAntPlace\bin"

    ant -buildfile D:\MyAntPlace\config\myTest.xml

    ) else (

    echo file does not exist

    EXIT)

    This appear to be working, but I get the following "error":

    'else' is not recognized as an internal or external command

    Any suggestions would be greatly appreciated.

    ~Jay

  • Alright,

    I figured it out, this is the working version!!

    @echo

    IF EXIST "C:\myProject\fileDrop\*.csv" (

    cd "C:\MypathToproject\Project\bin"

    dtexec /f load.dtsx

    cd "D:\MyAntPlace\bin"

    ant -buildfile D:\MyAntPlace\config\myTest.xml

    ) ELSE (

    echo file does not exist

    EXIT

    )

Viewing 3 posts - 1 through 2 (of 2 total)

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