January 8, 2002 at 4:24 am
I am using DTS to generate a CSV file.
I want to archive the generated CSV file and genrate a new CSV file every week
January 8, 2002 at 5:04 am
Usually manipulating files is done using the file system object in an ActiveX Script in the DTS package, or alternatively in an xp_cmdshell script (which could be done as a step in the scheduled job). Personally I prefer the DTS method as it puts all the code in one place and errors can be trapped more easily (eg the non-existence of the file).
Paul Ibison
Paul Ibison
Paul.Ibison@replicationanswers.com
January 8, 2002 at 6:23 am
Thanks
But still i have a problem
i havent used DTS much so i dont know whats the code to be written
Can you please help me out .
Thanks
January 8, 2002 at 7:04 am
In a DTS ActiveX script this will rename a file called c:\misc\xxx.txt - try it out.
Dim fs, sFilePath, sDestinationPath
Set fs = CreateObject("Scripting.FileSystemObject")
sFilePath = "c:\misc\xxx.txt"
sDestinationPath = "c:\misc\yyy.txt"
If fs.FileExists(sFilePath) Then
fs.CopyFile sFilePath, sDestinationPath
fs.DeleteFile sFilePath
End If
Set fs = Nothing
Paul Ibison
Paul Ibison
Paul.Ibison@replicationanswers.com
January 8, 2002 at 7:20 am
Thanks very much.
I will try this script .
Thanks again very much for me helping me out
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply