Home rsync: Sync all files to single directory, ignoring directory structure
Reply: 0

rsync: Sync all files to single directory, ignoring directory structure

user4599
1#
user4599 Published in September 20, 2018, 12:50 pm

I would like to sync all files to a certain directory without syncing the directory structure.

So far, I have this:

rsync -vcr --remove-source-files --exclude='*sample*' --exclude='*Sample*' --include='*/' --include='*.avi' --include='*.mkv' --include='*.mp4' --include='*.wmv' --exclude='*' $src1 $src2 $dest

That seems to be working fairly well, but if one of the included file types are in a sub-directory of the source directories, the parent directories will also be transferred.

To sum it up, I want all included file types to be moved straight to the single destination directory, WITHOUT copying the parent directory structure.

share|improve this question
  • Possible duplicate of Rsync make flat copy – Ruslan Osmanov May 8 '16 at 5:30

1 Answer 1

active oldest votes
up vote 0 down vote
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.320402 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO