-
Importing all the text file in a directory using DTS
Hi everyone
Thanks for reading and helping me out of this problem.
I have a directory where I have text file with date as a file name, thus all the files have different file names.
But I want to do is import all the text files into sql server 2000 ,right now i have a DTS package which i have up upload all the text files manually , I do not know how to loap it so that it DTS funcation check all the files in a directory and import it into database.
I will appreciate if anyone can help me out of this .
-
How about if you combined all the files into one text file first and then import it? If your files are like this:
C:\file1.txt
C:\file2.txt
C:\file3.txt
Use this command to combine them:
type C:\*.txt > C:\folder1\combinedfile.txt
And then import that combined file. Be careful about using the type command with wildcards like I did above. If I had put the combined file into the same directory as the other files:
type C:\*.txt > C:\combinedfile.txt
it would have actually doubled up the file because it would have put "C:\combinedfile.txt" into itself.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|