SQL Job fails when SSIS packages run with Path containing hyphen "-"

Viewed 161

I need to schedule a Job that runs multiple SSIS packages which reads data from multiple files.

File paths are like:

\\FilePath\uat-files\FileName.csv

So the Parameter values are like:

\\FilePath\uat-files\

The problem is that it interprets -files as an option:

Option "-files\ /Par $Project::FilePath;"\FilePath\uat" is not valid. The command line parameters are invalid. The step failed

No matter if the paths are entered as Parameter Value of SSIS step configuration (1 - on pic below) (of SQL Job) or passed by Environment Variables (2).

SQL Job - SSSI Step configuraiton

Unfortunately I cannot change the folder name. Need to figure out how to schedule SSIS packages. I already tried with quotation marks ("parameterValue").

The problem seems to be solved when I trigger the SSIS package as SQL step and execute the package using SSISDB stored procedure with FilePath as one of parameter but It cannot be done that way.

How to escape minus/hyphen in this particular case?

0 Answers
Related