naming the file as you require is easy enough to do in vbs.
Here is a function I use for a similar purpose:
Function yymmdd(Indate)
Dim strdate1, strdate2, strTime
strdate1 = Replace(Indate,"/","")
strdate2 = Right(strdate1,2) & Mid(strdate1,3,2) & Left(strdate1,2)
strTime = Replace(Time,":","")
yymmdd = strdate2 & "." & strTime
End Function
You'll need to make a few changes if you want yyyy as opposed to yy; supply
the built-in Date function as the Indate parameter.
The generated filename can then be supplied to the FileSystemObject's
enTextFile method.
> -----Original Message-----
> From: Yukon DBA [SMTP:[Email Address Removed] Sent: Tuesday, September 24, 2002 11:14 AM
> To: LazyDBA.com Discussion
> Subject: DTS
>
> Hi All,
> I want to transfer data from table to flat file by using dts.
> But my requirement is, the flat file format is <filename>YYYYMMDD.txt. So
> anybody crossed how can we create dynamic flat file name while running
> dts.
>
> Thanks in Advance,
> KM
MS Sql Server LazyDBA home page