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.
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. It runs daily.
One of the things my script does is create ZIP archives. 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.
The problem is that sometimes, my script is unable to move the ZIP file, so it remains in the temp directory. The Windows "move" command returns an "Access is denied" error, even when run from an admin command prompt. 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. My guess is that this is what is preventing the file from being moved.
I CAN, however, move the file from within Windows Explorer. The problem is that I cannot move the file from the command line.
My script generates a couple dozen ZIP files. The problem seems to happen to one file about once every other day. It's as if Backup and Sync is not releasing its lock on the file after it's done uploading it.
Operating System: Windows Server 2008
This issue has been cross-posted here: https://productforums.google.com/forum/#!topic/drive/wTCKvixBE7w;context-place=forum/drive
