Wednesday, March 7, 2012

Run a global variable dynamically

I have a SSIS pkg with several task. I need to run a global variable dynamically.

the global variable's value is basically a bat file with two arguments (\\.....\..bat \\......\.xls \\.....\...xls)

bat file arg1 arg2

This global variable gets set from its previous task at run time. I did put in this global variable as an argument in expression and for executable i am calling the cmd.exe file. But for some reason it does not work. the command prompt comes up wait for an action from user which is wrong. Please help

Thanks

Make sure that you have a full path to the batch file.

Also, make sure you are using the "/C" flag before the path to the batch file.

Command should look like:

cmd.exe /C \\server\mybatchfile.bat arg1 arg2......|||

Thanks Phil. That worked.

No comments:

Post a Comment