cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Discuss Dropbox Developer & API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Test whether file has finished syncing on windows

Test whether file has finished syncing on windows

MWS-TSG
Explorer | Level 3
Go to solution

Hi,

I need to test programatically (any language/script) whether a file which has just been changed locally on PC has finished syncing via dropbox. 

If it hasn't yet started syncing or hasn't yet finished, my code must wait.

My first stab was examining the dropbox file attributes (https://help.dropbox.com/installs-integrations/sync-uploads/extended-attributes), but having worked out how to get the extended attributes, I can't find any resources to interpret them.

I also considered the API, but I have read that there is not a straightforward check using the API on the status of a local filesystem file.

Any suggestions, or details for the attributes would be appreciated.

Thanks, and Happy 2020!

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

Unfortunately, Dropbox doesn't offer an official API for checking the status of the local Dropbox desktop client or files like this, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.

View solution in original post

7 Replies 7

Greg-DB
Dropbox Staff
Go to solution

Unfortunately, Dropbox doesn't offer an official API for checking the status of the local Dropbox desktop client or files like this, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.

MWS-TSG
Explorer | Level 3
Go to solution
Greg, thanks for the confirmation of what I saw elsewhere (but needed checking).
My half-baked ideas of the API would have me expect that the API is running on the Dropbox server, which might not even yet know that the file had been changed if the syncing hasn’t yet started, in which case a server API call would be unreliable anyway.
Would you know anything about interrogating the local machine using file attributes or the Dropbox service?

Greg-DB
Dropbox Staff
Go to solution

That's correct. The Dropbox API operates by communicating with the Dropbox servers, so information about unstarted or incomplete activity from desktop clients wouldn't be available anyway.

I'm afraid I don't have any information to offer about inspecting local file attributes or the local Dropbox client/service. I can't recommend doing so anyway as that's not officially documented for use as a programmatic interface like this, and so is subject to change.

MWS-TSG
Explorer | Level 3
Go to solution

Thanks, Greg.

I have experimented with manually pausing dropbox for the duration of my process, and then un-pausing. This has the desired effect. Therefore I do have one more question which is:

How do I pause/un-pause Dropbox syncing programatically, using a script or command?

Thanks again.

Mark.

Greg-DB
Dropbox Staff
Go to solution

Hi Mark, unfortunately Dropbox also doesn't offer an official interface for pausing/resuming the desktop client. I'll pass this along as a request as well, but likewise I can't promise if/when that might be implemented. Apologies I don't have better news for you!

MWS-TSG
Explorer | Level 3
Go to solution

Thanks, Greg!

Mark.

MWS-TSG
Explorer | Level 3
Go to solution

In case anyone else has a simiar challenge, mine was related to a large file in Windows 10 becoming 'locked' by dropbox just after it was changed, which was just when the next process (MS Access) needed to open it, and could not.

The workaround I have adopted is to suspend dropbox using a command in a batch file, run my tasks, and then resume dropbox. I followed this post:

https://superuser.com/questions/693680/pausing-resuming-dropbox-from-the-command-line-windows

using the pssuspend command.

That seems to have worked well.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    MWS-TSG Explorer | Level 3
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?