![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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() ) |
#3
| |||
| |||
|
|
I'm not exactly clear on what you need but I think what you are after is something where you use a Left and Len to strip out the .txt part of the file name. Then concatenate the value from the date function Day(Now()) and add the .txt. Something like: Left(sFilename, Len(sFilename) - 4) & Day(Now()) & ".txt" -Sue On Tue, 1 Feb 2005 05:44:36 -0800, "anonymous" anonymous (AT) discussions (DOT) microsoft.com> wrote: 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() ) |
![]() |
| Thread Tools | |
| Display Modes | |
| |