Automating DTS import of data files

Hi guys,

I have a number of data files in comma separated value format that need to be imported into a database in SQL Server.  Until now, I have been using Enterprise Manager to manually go through the DTS wizard and import each file one by one.  Is there any way of creating a batch job that will do the import file by file?  Any ideas would be much appreciated!

Who is Participating?
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.

put this in a .bat file

dtsrun /s xxx /u xxx /p xxx /n DTSPACKAGENAME


dtsrun /s xxx /e /n DTSPACKAGENAME    for trusted connection

add a line per DTS PACKAGE

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
sorry... should explain more...

/s servername /u username /p password /n dtspackagename
You can also right click on the DTS package in EM and choose to Schedule the package as appropriate for your needs...
sviriyalAuthor Commented:
This is too good!!!!  Thanks so much estyler!  I will raise the points because I think the quick response time deserves some merit too.  Thanks again!  
You can also run DTSRUNUI from a command prompt and it will generate the string you need to run a job....
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
Microsoft SQL Server

From novice to tech pro — start learning today.