You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
Jeff_S1
4 years agoExplorer | Level 3
sync only one folder on linux
I have a huge dropbox business account, and I'd like to sync one "deep" folder on a linux client. This folder is deep in the folder hierarchy, so for example the folder: "folder 1/folder 2/folder 3"...
Robert T.26
Explorer | Level 4
i just happened to find this old bash script i wrote under ~/Dropbox/.dropbox.cache/old_files/
Because it was found under /old_files/, it is probably not the best version, so use at your own risk! Since it does not delete files, only does dropbox exclude operations, it might be safe. This was written maybe a decade ago.
Looks like it would give an error because a folder does not exist in the readlink call. mkdir -p ${T} before looping might be necessary.
The intent is to automate adding a parent folder of the deeply nested targeted folder folder you want to download.
While excluding all other folders brought in when a parent folder is added.
I should have a newer version in my old bitbucket files or github or sf, but will take a while to find it.
#!/bin/bash
echo Problems:
echo dropbox exclude remove ~/Dropbox/DontExcludeMe/MeNeither
echo does nothing unless its parent directory is first included first.
echo When the parent directory is included, it brings in all its subfolders and files.
echo I smell a tree walk of some kind here.
echo Is bash capable of binary trees?
echo Would have to include all the ancestors that do not exist yet
echo and then add the child directories one-at-a-time
echo but at the same time, exclude any other directories.
D=~/Dropbox
T=~/Dropbox/DontExcludeMe/MeNeither # T for TARGET
#mkdir -p ${T} # May need to uncomment this to precreate the wanted nested folder.
T2=${T};
dropbox exclude remove ${T} #WONT DO ANYTHING IF PARENT DOES NOT EXIST.
echo ${T2};
while [ ${D} != ${T2} ]; do J=$(dirname $(readlink -f ${T2} )); #readlink CAUSES FAILURE WHEN $T DOES NOT EXIST
echo readlink CAUSES FAILURE WHEN ${T2} DOES NOT EXIST. Add code to test for existance of ${T2}.
echo ${J};
echo "We have to filter for the directory target ${T2}, otherwise we add it right back to be excluded!"
dropbox exclude remove ${T2}
sync #Give it a little time to come back. Should loop for it to be back in existence.
find ${T2} -maxdepth 1 -type d -print0 | egrep -v "^${T2}$" | xargs -0 dropbox exclude add
T2=$J;
done;
#find ${T} -maxdepth 1 -type d -print0 | egrep -v "^${T}$" | xargs -0 dropbox exclude add
Robert T.26
2 years agoExplorer | Level 4
Nothing new, but SSDs smaller than Dropbox storage.
Because the filesystem is out of space, i excluded a large number of files from syncing locally to dropbox using
dropbox exclude add ~/Dropbo/ExcludeThisLargeFolder/
But dropbox does not free up that space first, it continues to attempt to download more files even though it knows it is out of space.
Does not matter if i 'Pause Syncing' or limit the download bandwidth to about zero.
Need exclude to go first.
Not sure if the Delete operation talked about above applies to files and folders you do NOT want deleted from Dropbox.com storage.
About View, download, and export
Need support with viewing, downloading, and exporting files and folders from your Dropbox account? Find help from the Dropbox Community.
Need more support
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 or Facebook.
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!