Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
rkumar28
Starting Member
49 Posts |
Posted - 2005-10-20 : 12:37:28
|
| Hi,I have 6000 data files that needs to be loaded into the same table. The column format and delimitation is the same in each file....Is there a way to combine the data from 6000 file into one file and load into the table using DTS. I have limited knowledge of the scripting languages. Is there a way I can use DOS command to do the concatenation.Is there a way we can achieve this thrugh DTS. Can DTS handle loading from multiple files into single table?I would really appreciate any help in this regards.ThanksRaj |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-10-20 : 13:44:54
|
| You can concatenate via DOS with this:type *.* > C:\SomeConcatenatedFile.txtMake sure you navigate to the directory where these files are first and also that only those files are in that directory. Otherwise, you'll need to change the *.* part first.Tara |
 |
|
|
rkumar28
Starting Member
49 Posts |
Posted - 2005-10-20 : 17:07:41
|
| Thanks Tara.....this really helped.I have another issue related to these files. My folders and files are named something like: 08022005\00195.txt...Where: 08022005 is the folder name and 00195.txt is the file name. Is there a dos command or script that can insert these folder name and filename into the datafile as part of data. The file is a pipe delimited file. Will appreciate any advice on this.....ThanksRaj |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-10-20 : 17:20:31
|
| I'm not sure that I understand your question. You need a utility to copy the files from multiple directories into one directory?Tara |
 |
|
|
|
|
|