cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Tell us what you want to see on the Community here!
Close

Dropbox files & folders

Get in sync with the Dropbox Community. Our members can answer all your questions on Dropbox files and folders. Join a discussion or start your own today.

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

how to CLI exclude sub folder

Highlighted

how to CLI exclude sub folder

Explorer | Level 3

I installed the dropbox client on a headless server.

I played a bit with the exclude feature and think it is too limited for what I want to achieve.

Be default I want to sync nothing at all, so I start by doing:

dropbox.py exclude add *

That works perfectly when I run it from my Dropbox folder.

Then I can sync specific folders by using exclude remove <folder>.

So far so good.

 

But what to do when I only want to sync a sub folder?
When I have this folder structure:

Dropbox
-- dev
---- app1
---- app2
-- photos
-- public

dev, photos and public will be excluded by 'add *'

Then I tried:

dropbox.py exclude remove dev/app1

Because I want to have app1 available and leave app2 online only.

It says: 

No longer excluded:
dev/app1

But nothing happens. 

 

Does anyone know how to make this work?

1 Accepted Solution

Accepted Solutions
Highlighted

Re: how to CLI exclude sub folder

Super Collaborator | Level 20

Hi @janvv,

Your point of view is wrong! You can't have a subfolder, 'flying' in nothing (i.e. without the parent folder). 😉

Hope this clarifies matter.

View solution in original post

4 Replies 4
Highlighted

Re: how to CLI exclude sub folder

Dropboxer

Hey there @janvv; thanks for joining our Community!

 

Can you please let me know if the app is up to date or still syncing by running the 'status' command?

 

Thanks!



Walter
Community Moderator @ Dropbox
https://dropbox.com/support


Heart Did this post help you? If so, please give it a Like below.
Still stuck? Ask me a question!
Tips & Tricks Find new ways to stay in flow or share your tips on how you work smarter with Dropbox.

Highlighted

Re: how to CLI exclude sub folder

Explorer | Level 3

Hmm... my install script downloads the application from https://www.dropbox.com/download?plat=lnx.x86_64.

I assume that's the latest version 

 

Anyway, the way to solve my scenario:

dropbox.py exclude remove dev
dropbox.py exclude add dev/*
dropbox.py exclude remove dev/app1

A bit cumbersome when the subfolder I want to sync is further down the tree. But with a bit of scripting I should be able to make a script that can sync any folder I give it as a parameter.

 

Or just uninstall the Dropbox client, and use another syncing tool like RClone....

 

 

 

Highlighted

Re: how to CLI exclude sub folder

Super Collaborator | Level 20

Hi @janvv,

Your point of view is wrong! You can't have a subfolder, 'flying' in nothing (i.e. without the parent folder). 😉

Hope this clarifies matter.

View solution in original post

Highlighted

Re: how to CLI exclude sub folder

Explorer | Level 3

Yes, you are right Zdravko.

That's why I cannot exclude parent folders.

I'll make a recursive function that walks through the tree to make the proper settings.

 

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?