Hi - I am trying to copy one file (the source) to another location (the destination) and. ideally, I would like to add a date to the file as it is copied.
This is the code I am using:
Function Nightly()
Dim CurrentDate As String
CurrentDate = Date
CurrentDate = Format(CurrentDate, "MMDDYY")
FileCopy "\\nel\mfsc-dsndm-d\Nightly.rpt", "\\netapp3\ds-mfsas-d\Backup Secure\Nightly_CurrentDate.rpt"
End Function
The error message I am receiving is "RunTime Error 76", "Path not found". I assume that my problem lies with the fact that both the source and destinations need to be string functions and in that regard I have tried concatenations etc. (e.g. "\\nel\mfsc-dsndm-d\" & "Nightly" & ".rpt" and "netapp3\ds-mfsas-d\BackupSecure\" & "Nightly" & "__CurrentDate"& ".rpt" but NOTHING seems to work.
Any suggestions? Thanks in advance for your help.
This is the code I am using:
Function Nightly()
Dim CurrentDate As String
CurrentDate = Date
CurrentDate = Format(CurrentDate, "MMDDYY")
FileCopy "\\nel\mfsc-dsndm-d\Nightly.rpt", "\\netapp3\ds-mfsas-d\Backup Secure\Nightly_CurrentDate.rpt"
End Function
The error message I am receiving is "RunTime Error 76", "Path not found". I assume that my problem lies with the fact that both the source and destinations need to be string functions and in that regard I have tried concatenations etc. (e.g. "\\nel\mfsc-dsndm-d\" & "Nightly" & ".rpt" and "netapp3\ds-mfsas-d\BackupSecure\" & "Nightly" & "__CurrentDate"& ".rpt" but NOTHING seems to work.
Any suggestions? Thanks in advance for your help.