Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CopyFile? Is there an AppendFile?

Status
Not open for further replies.

jsblakley

Programmer
Jun 25, 2003
14
US
I have a DTS package that copy flat files to a common directory, then copy the multiple flat files into one flat file. From there we will import the data into our database.

Any suggestgions?
 
A bit confused here ... DO you have a DTS package that is already doing the actions described OR are you looking for a way for a DTS package to accomplish what you posted above?

Thanks

J. Kusch
 
I have an existing package, but I need to figure out how to append to a flat file.

Thanks!
Jeff
 
If you are trying to append all of your files you have gather into 1 file, and for sake of argument they are all to be text files, then you probably want to create an "Execute SQL Task" object. In there you could use an

EXEC
master..xp_cmdshell 'COPY C:\WhatEverDir\*.txt AllFiles.txt'

Is this what you are after?

Thanks

J. Kusch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top