DTS 2000 Active X Script file copies

  • 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!

  • 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!

  • This article may help you find the latest file at least.

    http://www.sqlservercentral.com/articles/DTS/importingthelatestfileinafolderviadts/1829/

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply