locked
Run a command line statement RRS feed

  • Question

  • Hi,

    This is probably really simple but I want to run a command line statement from within SSIS and I can't figure it out.  I am assuming I need to use the execute process task but can't quite figure out how to configure.

    My basic process is that SSIS iterates through a folder of XML files, writing the file name to a variable which it then needs to pass to the command line statement.

    The statement I am trying to run is:

    "C:\Program Files (x86)\Visokio Omniscope\OmniscopeEnterprise.exe" -executeAction "C:\SSIS\Omniscope\0.Input\WWSA_Cat12.xml"

    which I have set up in a variable as:

    "\"C:\\Program Files (x86)\\Visokio Omniscope\\OmniscopeEnterprise.exe\" -executeAction "+"\""+@[User::InputFile]+"\""

     

    The execute process task seems to want me to specify what application I want to run, but all I want to do is run this statement.

     

    Any help much appreciated.


    Ed Clarke | www.atheonanalytics.com
    Wednesday, November 16, 2011 12:05 PM

Answers

  • The answer is that I do need to configure the Executable and arguments settings and not try and pass them through as a whole string. Now have it working with:

    Executable= C:\Program Files (x86)\Visokio Omniscope\OmniscopeEnterprise.exe (populated by a variable)

    Arguments= -executeAction "C:\SSIS\Omniscope\0.Input\WWSA_Cat12.xml" (populated by a variable)


    Ed Clarke | www.atheonanalytics.com
    • Marked as answer by edtcrawford Wednesday, November 16, 2011 1:59 PM
    • Edited by edtcrawford Wednesday, November 16, 2011 2:01 PM
    Wednesday, November 16, 2011 1:59 PM

All replies

  • Make sure u set the property "Evaluate as Expression" when u use the variable

    and use Foreach for iteration of the files, in that take FileSystemTask and

    the expression for the Connection manager

     

    or

     

    Directly take paths in ForEach. This would be easy   


    Vijay Kolisetty
    • Proposed as answer by Munna Kollu Wednesday, November 16, 2011 6:53 PM
    Wednesday, November 16, 2011 12:13 PM
  • Vijay,

    Thanks for the response.  I am comfortable with foreach loops and have built many packages which process directories of files and I have set the evaluate as expression to true.

    What I am struggling with is how to pass the statement contained within the variable to the command line.


    Ed Clarke | www.atheonanalytics.com
    Wednesday, November 16, 2011 12:17 PM
  • The answer is that I do need to configure the Executable and arguments settings and not try and pass them through as a whole string. Now have it working with:

    Executable= C:\Program Files (x86)\Visokio Omniscope\OmniscopeEnterprise.exe (populated by a variable)

    Arguments= -executeAction "C:\SSIS\Omniscope\0.Input\WWSA_Cat12.xml" (populated by a variable)


    Ed Clarke | www.atheonanalytics.com
    • Marked as answer by edtcrawford Wednesday, November 16, 2011 1:59 PM
    • Edited by edtcrawford Wednesday, November 16, 2011 2:01 PM
    Wednesday, November 16, 2011 1:59 PM