SSIS problem creating multiline DOS batch file

Hi,

I have to create a multiline DOS batch file in SSIS that looks like this:

cd e:\client\data
copy generic_output.txt clientname.yyyymmdd (yyyymmdd is today's date)

I have created quite a few single line DOS copy statements that do the copy (using a Derived column in the Data Flow) but can't come up with an approach that will allow me to create a template file that contains the (hardcoded) first line and then have a Data Flow task that writes out the first line and then have the Derived column be the second line.

Can I write out both commands in the Derived Column and put in a CR-LF in between the cd command and the copy command? Or is there a better approach?

Thanks,

Dick
Dick RosenbergAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dick RosenbergAuthor Commented:
Hi

I figured out a way that works. The cd command is fixed so I put that into a file. Then I used a Data Flow to build the COPY command in another file. Then I set up a copy.bat file to copy the 2 files, and then finally an Execute Process task to execute the final batch file. It works.

Thanks,

Dick
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
SSIS

From novice to tech pro — start learning today.