4

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.

enter image description here

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

1

I found a solution that seems to work. At the start of my script, I kill all "googledrivesync.exe" processes. Then, I copy all the files and re-launch Google Backup & Sync.

One minor downside is that the Google Backup & Sync icon in the system tray does not appear. But it still syncs the files.

| improve this answer | |
  • 2
    I'm using Google Backup and Sync as well to keep my projected synced across multiple development environments and it sure messes things up. Weird how Dropbox doesn't have any of those issues. – A. Vieira Feb 8 '18 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.