itchyII
MIS
- Apr 10, 2001
- 167
Hello all, I am new to dts and I am trying to copy a file from one location on a server to another location on another server. I was told that I could do this using an Activex scripting task. I also want to append the date to the filename of the destination file. The problem with what I have, is that it doesn't work unless the destination file already exists. I want to create a new file for the destination (a copy of the source file), and then place it in a nother location with a different filename. Here is what I have so far.
Help please!
ItchyII
Code:
Function Main()
Dim fso, sourceFile, destFile
Set fso = CreateObject("Scripting.FileSystemObject")
sourceFile = "\\servername\foldername\filename.xls"
destFile = "\\servername2\foldername2\filename2.xls"
fso.CopyFile sourceFile,destFile,true
Set fso = Nothing
Main = DTSTaskExecResult_Success
End Function
Help please!
ItchyII