SSIS Execute process task to copy 2 files into new file

2.7k Views Asked by At

Hi i wanted to copy the records of two csv files into a new file.

Task : Copy A + B into C

 OR Copy A to B ( this is what i am doing but i don't know how via SSIS)

I used SSIS to do so using Execute Process Task . In order to verify i tried it in command prompt. enter image description here

When i tried via SSIS package it fails i am not sure why here are the inputs for the executable and the arguement. enter image description here

Thank you very much in advance

1

There are 1 best solutions below

1
Hadi On BEST ANSWER

Recommendations:

  • Don't use \ when assigning a value (only in expressions)
  • You have to use /C before passing parameters to cmd.exe
  • Because you didn't specify the Working directory you should provide the full path for each file, if not Out.csv will be created in the package runtime folder.

The command must be like the following:

/C copy /b C:\Temp\Source.csv + C:\Temp\Destination.csv C:\Temp\Out.csv

Reference