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.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 FileName

Author  Topic 

sardinka
Posting Yak Master

142 Posts

Posted - 2005-02-01 : 08:45:22
In activeX I have the following VBscript.
Where I getting the filename and location from Connection Source.
I need to add the date to the file name by using the code below the date
is adding at the end of the file name after .txt. I need to add before the .txt
to look like that \\filenamedate.txt
How do I do this?
Set oConn = oPkg.Connections("Text File (Source)")
sFilename = oConn.DataSource & Day(Now() )

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2005-02-01 : 20:26:56
try:
sFilename = replace(oConn.DataSource, ".txt", Day(Now() & ".txt")

Corey

"If the only tool you have is a hammer, the whole world looks like a nail." - Mark Twain
Go to Top of Page
   

- Advertisement -