

My script generates a couple dozen ZIP files.

The problem is that I cannot move the file from the command line. I CAN, however, move the file from within Windows Explorer. My guess is that this is what is preventing the file from being moved. I used Process Explorer to search for file locks and found that the "googledrivesync.exe" process has a lock on the destination file that the script is trying to overwrite. The Windows "move" command returns an "Access is denied" error, even when run from an admin command prompt. The problem is that sometimes, my script is unable to move the ZIP file, so it remains in the temp directory. The ZIP archives are first created in a temporary directory, and then they are moved to the Backup and Sync folder for backup, overwriting the previous day's ZIP file. One of the things my script does is create ZIP archives. I have a script that copies files to a certain folder on my computer, which the Backup and Sync app is configured to backup to Google Drive. I'm experiencing an issue with the "googledrivesync.exe" process not releasing its lock on certain files that I'm backing up, which prevents me from writing to them.
