Hello Oliver Smith,
Robocopy errors like “The system cannot find the path specified” on valid targets often come down to how the paths are being interpreted during execution. Even if the folder names look fine, mapped network drives can behave differently depending on whether the script is running under elevated permissions or scheduled tasks. In those cases, the mapped drive letter may not be recognized, which causes Robocopy to drop the error.
To fix this, I recommend using the UNC path format (e.g., \ServerName\ShareName) instead of relying on mapped drive letters. This ensures Robocopy always sees the correct target regardless of context. Also, double‑check that your script is running with the same user account that has access to the network share. If you are scheduling the job, make sure the task is set to “Run whether user is logged on or not” and that the account has proper permissions.
Another common cause is trailing spaces or hidden characters in folder names. Running a quick check with dir /x can reveal if the folder has alternate short names that Robocopy is trying to resolve. Updating to the latest version of Robocopy (included with current Windows builds) can also help avoid older parsing bugs.
I hope this guidance helps you stabilize your deployment script. If you find this answer useful, please hit “accept answer” so I know it addressed your concern.
Jason.