Hello,
I have set up a function to automatically backup the scheduled task files on our computer, located at "C:\Windows\System32\Tasks\Databases"
The following code is throwing a permission denied error:
objFSO is declared and initialized as:
After some googling about this issue, i have ensured that the archivePath i am passing has a trailing backslash.
I also think the permissions are fine because i am manually able to copy paste the files at C:\Windows\System32\Tasks\Databases into the archive folder fine. However, when I try to do it through code i am getting the permission denied error.
Any help with understanding/resolving this issue would be greatly appreciated!
I have set up a function to automatically backup the scheduled task files on our computer, located at "C:\Windows\System32\Tasks\Databases"
The following code is throwing a permission denied error:
Code:
objFSO.CopyFolder "C:\Windows\System32\Tasks\Databases*", archivePath
objFSO is declared and initialized as:
Code:
Dim objFSO As Object
Set objFSO = CreateObject("Scripting.FileSystemObject")
After some googling about this issue, i have ensured that the archivePath i am passing has a trailing backslash.
I also think the permissions are fine because i am manually able to copy paste the files at C:\Windows\System32\Tasks\Databases into the archive folder fine. However, when I try to do it through code i am getting the permission denied error.
Any help with understanding/resolving this issue would be greatly appreciated!