I'm trying to take a file that has a name of agtpacxxxxxx.txt where 'xxxxxx' can be almost anything, and copy it to a new file called agent.txt. I keep getting a path not found error when trying to use the following script:
Function Main()
Dim fso, sourceFile, destFile
Set fso = CreateObject("Scripting.FileSystemObject"
sourceFile = "C:\projects\dsc\source\agtpac*.txt"
destFile = "C:\projects\dsc\source\agent.txt"
fso.CopyFile sourceFile,destFile,true
Set fso = Nothing
Main = DTSTaskExecResult_Success
End Function
Can anyone help me out?
thanks
-D
Function Main()
Dim fso, sourceFile, destFile
Set fso = CreateObject("Scripting.FileSystemObject"
sourceFile = "C:\projects\dsc\source\agtpac*.txt"
destFile = "C:\projects\dsc\source\agent.txt"
fso.CopyFile sourceFile,destFile,true
Set fso = Nothing
Main = DTSTaskExecResult_Success
End Function
Can anyone help me out?
thanks
-D