I have a batch file which I use for my backup. It runs with administrative privileges. It works fine, except for the last command:
copy /y "D:\HDDocuments\PWSafe\test.psafe3" n:\
This should copy 1 file to a network drive. However, when it tries to execute this, the batch file returns the error "The system cannot find the path specified". If I copy the command line and paste it into a CMD window it runs fine, except
if I run CMD as administrator. Conversely, if I do not run the batch file as administrator, the command also executes fine, but then the rest of the batch file fails as it cannot access all files needed.
All other commands in the batch file use ROBOCOPY, and copy to a USB drive, not to a network drive. The network drive is a flash drive that is plugged into my router (TP-Link Archer D5) so it is always visible to other WiFi devices. The PC is hardwired into the router.
Why is it that the same command works if executed as a normal user, but not as administrator?