I am trying to include the date in the filename of a file that I am copying. I am having problems converting the date to a string and then concatenating it into the filename. The vbscript is running in an ActiveX script in a DTS package.
I've included the code that I have been using.
In my main method:
I am recieving the following errors:
Error Code: 0
Error Description: Path not found.
Thanks in advance for your help
-Jim
I've included the code that I have been using.
In my main method:
Code:
strToUploadDir = "C:\TEMP"
strUploadedDir = "C:\TEMP\COPY"
strCurDate = Cstr(date())
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists(strToUploadDir & "\upload.txt") then
fso.copyfile strToUploadDir & "\upload.txt", strUploadedDir & "\uploaded" & strCurDate & " .txt"
Main = DTSTaskExecResult_Success
Else
Main = DTSTaskExecResult_Failure
End if
I am recieving the following errors:
Error Code: 0
Error Description: Path not found.
Thanks in advance for your help
-Jim