I'm currently using a robocopy in a loop performing the following command over a number of different directories:
robocopy $sourceFolder $purgeFolder /MOV /LEV:0 /MINAGE:$OlderThan
All source folder paths are at the same level in our directory structure and have exactly the same permissions however when the loop reaches certain directories robocopy just continually reports ERROR 87 (0x00000057) Accessing Destination Directory
. The script is being run with a service account with full control over the directories and files, and when I run the script myself I don't encounter the same issues. Robocopy itself creates the $purgeFolder
successfully however then reports it can't access it.
User contributions licensed under CC BY-SA 3.0