Google Drive Desktop "Pause" via powershell

Viewed 106

Does anyone know if its possible to use the gGoogleDrive desktop "pause" functionality via a PowerShell script?

I know I can check for the drive 'process' via Get-Process but that will kill it entirely and I'm not sure how it reacts to not being shutdown properly if its in the middle of syncing something? Hence my desire to use pause which is available via the context menu in the app.

I want to ensure that GoogleDrive is 'paused' in terms of syncing files locally to gPhotos. I've run into issues where I'm copying files from one location into the drive sync folder and drive uploads incomplete files as its not waiting for the file to be completely finished copying. Thus my reason for asking if the drive API/SDK can support the 'pause' method.

1 Answers

On macOS the Google Drive app has a command-line interface, so it probably does on Windows, too.

cd /Applications/Google Drive.app/Contents/MacOS
./Google\ Drive --help
./Google\ Drive --pause_syncing
./Google\ Drive --resume_syncing
Related