Copy file and add time to name
' Copy File
' Option Explicit
Function Main()
Dim oFSO
Dim sSourceFile
Dim sDestinationFile
Dim sdate
sdate = CStr(Year(Date)) & CStr(Month(Date)) & CStr(Day(Date))
Set oFSO = CreateObject("Scripting.FileSystemObject")
sSourceFile = "\\Server\C$\importexport\File_Name.asc"
sDestinationFile = "\\ Server\d$\DBA\ Archive\File_Name" & sdate &".asc"
'MsgBox( sDestinationFile)
oFSO.CopyFile sSourceFile, sDestinationFile
' Clean Up
Set oFSO = Nothing
Main = DTSTaskExecResult_Success
End Function
' Option Explicit
Function Main()
Dim oFSO
Dim sSourceFile
Dim sDestinationFile
Dim sdate
sdate = CStr(Year(Date)) & CStr(Month(Date)) & CStr(Day(Date))
Set oFSO = CreateObject("Scripting.FileSystemObject")
sSourceFile = "\\Server\C$\importexport\File_Name.asc"
sDestinationFile = "\\ Server\d$\DBA\ Archive\File_Name" & sdate &".asc"
'MsgBox( sDestinationFile)
oFSO.CopyFile sSourceFile, sDestinationFile
' Clean Up
Set oFSO = Nothing
Main = DTSTaskExecResult_Success
End Function