February 18, 2008 at 10:40 am
I am not sure if this question belongs in this forum but here it goes. I am creating a DTS 2000 Package and have the following ActiveX script:
Dim oPKG
Dim cn
Dim oFSO
Dim sSourceFile
Dim sDestinationFile
Set oFSO = CreateObject("Scripting.FileSystemObject")
sSourceFile = "\\HQCLIPSHIP01\KEWILL\CSWIN\ARCHIVE\FEB18_08.CS"
sDestinationFile = "\\hqfs01\Public\Operations\Clippership\ARCHIVE\DestinationFile.txt"
oFSO.CopyFile sSourceFile, sDestinationFile
' Clean Up
Set oFSO = Nothing
Main = DTSTaskExecResult_Success
What I need to know would be the best way to copy the latest file from the sSouceFiles ( this folder is updated every day so tomorrow the file I would want to grab would be FEB19_09.CS) then copy and rename it to something like the following: FEB18_2008-02-18_0815.txt in the sDestintionFile.
ANy ideas?
Thanks,
Art
Database Analyst
Tastefully Simple, Inc.
alorenzini@tastefullysimple.com
" Some days, it's not even worth chewing through the restraints!
February 19, 2008 at 5:51 am
Can someone please help me on this?
Thanks,
Art
Database Analyst
Tastefully Simple, Inc.
alorenzini@tastefullysimple.com
" Some days, it's not even worth chewing through the restraints!
September 11, 2008 at 2:55 pm
This article may help you find the latest file at least.
http://www.sqlservercentral.com/articles/DTS/importingthelatestfileinafolderviadts/1829/
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy