Look at FileSystemObgect
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/h
tml/jsobjFileSystem.asp). You can find any file you want, move it when you
are done, rename it, etc.
Let me know if you have questions,
Julia
-----Original Message-----
From: Beal, Jeremy [mailto:[Email Address Removed] Wednesday, July 30, 2003 9:57 AM
To: LazyDBA.com Discussion
Subject: Importing Text File DTS question
Hello fellow DBA's,
Lets hope this makes sense.
I am using a DTS Package that I created.
I am using an Execute Sql Task. Within this I am simply
deleting records for the current month.
Upon success, then I am importing using Text File (source).
Within this, it has a form whose properties have the filename,
and various settings to import the file. Basically I am
appending data from a text file to a table whose records were
deleted for the current month.
Problem: Is there another way to import text file
programmatically. The text file (source) has the fixed name of
the text file. I would like to be able to change the file name
thru code. Lets say it is august, i would like the code to look
for a filename for august, instead of july. I need it to be
done automatically without manual editing the DTS package.
Regards,
Jeremy Beal
Shamrock Materials Inc.
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To unsubscribe, e-mail: mssqldba-[Email Address Removed] additional commands, e-mail: mssqldba-[Email Address Removed]MS Sql Server LazyDBA home page