Can rclone sync files without syncing directory?

Hello

Thank you for this wonderful software

My question is if I can use rclone sync in such a manner as the example below

source drive has pictures
Drive/Pictures/Jan/18/pic1,jpg, pic2.jpg
Drive/Pictures/Jan/19/pic3,jpg, pic4.jpg etc
My sync drive
Drive2/Pictures/pic1.jpg, pic2.jpg, pic3.jpg, pic4.jpg

is it possible to ignore jan and 18 directory and 18?
and only sync the final file?

Rclone can't flatten the directory structure like that at the moment.

Are you doing the sync over and over or just a once off?

What you could do is sync to the Jan/18 Jan/19 directory structure then write a little script to hardlink the files into the destination directory. This won't use any more disk space and will allow you to repeat your sync over and over again.

A script to flatten the files would be

find /path/to/source/files -type f -exec ln -v \{\} /path/to/dest/ \;
1 Like

hey I am sorry if I didnt make it clear
I meant meant in context of syncing google drives
will the hard link still work in a cloud drive?

yes the plan is to sync daily.

if it cant obviously there is no issue thank you for the solid work and support

Hard links are not supported on any cloud storage I'm aware of.

Google drive can do hard links (sort of) but rclone doesn't support them :frowning:

How many of directories are there in Drive/Pictures ? It would be possible to run an rclone per directory fairly easily.

yes I will do that.

my problem was that if I sync to one major directory and have like 5-6 syncs to one main directory each sync will delete the other ones work since their source is different

like sync /picture/jan/18 to pics/
sync pictures/jan/19 to pics/

I feel ill just use copy instead
I guess I was over complicating it

the deletions would be rare and can be handled manually

Thank you so much I dont want to take more of your time

Yes you want to use rclone copy rather than rclone sync - I should have mentioned that.

If there aren't too many directories then this is an OK strategy

1 Like

Thank you I really appreciate you taking time to help!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.