We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
projectdeliverypartners
4 years agoHelpful | Level 5
Checking in and out / pause sync on folder
Hi All, I'm new to app development and to this forum and I feel my question is so basic it must have been asked and solved before however, I cannot seem to find anything similar within the existi...
Здравко
4 years agoLegendary | Level 20
I see what you want to achieve, but activities exactly what you want are not supported. While on Linux it's relatively simple to do something alike (pause and resume, after you have done) using shell script, on Windows it isn't so trivial. In all cases you can upload all target files independently of official Dropbox application. Just create your own upload script and do it. Similar Python example, you can start from (use as a template), can be seen here. 😉 You can realize the same on any programing language.
Good luck.
projectdeliverypartners
4 years agoHelpful | Level 5
Thank you Здравко,
If i read behind the lines here, it's not supported but perhaps it can be done? I have thought of doing it outside of dropbox via basic shell script, most probably python yes. It's more complicated than uploading but surely not very hard. It would have to be something like this:
- Copy project folder from dropbox to local drive folder
- Confirm copy complete, delete contents of dropbox project folder.
- Create some kind of trigger upon close of local drive project from the app and form message, 'Upload project to Dropbox?"
- Hit yes and if so, it uploads accordingly, and deletes the copy in the local drive folder.
I would very much like to avoid copying whole project folder location if i can. A better way to me would be to:
- pause syncing as i do manually only limit to a particular folder or (with firewall?),
- once project has been edited and closed down, maybe rename the project folder on dropbox to *.upload, create new project folder with previous name and copy entire contents into it. This way the root folder would have been created at a new time and have brand new metadata so dropbox will surely upload the entire contents as new.
What do you think?
- Здравко4 years agoLegendary | Level 20
projectdeliverypartners wrote:...
I would very much like to avoid copying whole project folder location if i can. ...
Hi again projectdeliverypartners,
To be honest I have no idea why you need this copy, delete, etc. 🤔 Isn't keeping the files on single place doesn't work for you? (Let's say keep them outside
the Dropbox folder and opt out the same folder in Selective Sync on Dropbox application, for instance)
projectdeliverypartners wrote:... A better way to me would be to:
- pause syncing as i do manually only limit to a particular folder or (with firewall?),
...
As I said, if you work on Linux, that would be very simple way:
#!/usr/bin/bash dropbox stop # # do something on your project here # dropbox start
Unfortunately, inapplicable on Windows and Mac. Dropbox application there doesn't come with CLI. 🤷 Using firewall or other similar workarounds would not work!
It's good idea to check why a changed file stays with the same timestamp, if there is such. 😉 This gonna give you direction.
PS: One more detail, you may be useful to know, is fact that metadata itself alone are never updated by Dropbox! In other words metadata gets, eventually, changed when least one byte in the file data is different. If you update some file (text or binary) to exactly the same content, local timestamp will change, but cloud timestamp wont! Such files aren't considered changed; keep this in mind.
- Greg-DB4 years ago
Dropbox Community Moderator
projectdeliverypartners As Здравко noted, unfortunately Dropbox does not offer an API or way to programmatically manage the official Dropbox desktop client, such as to pause or resume syncing, except that the Dropbox desktop client on Linux only does support some command line commands. I'll pass this along as a feature request, but I can't promise if or when that might be implemented.
About Discuss Dropbox Developer & API
Make connections with other developers
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!