rsync only directories containing a certain file type
First, a confession. This is actually a Windows port of rsync I'm using. Still, this question should be valid regardless of operating system. I'm trying to copy only the music from a large external drive to my laptop hard drive. The command I'm using below works, but with one caveat. It copies every directory regardless of whether that directory contains the files specified. So what I end up with is the folders containing my music, but also a bunch of empty folders. Is there a command that I can add to rsync so that it doesn't copy folders that don't contain these files? If not, is there another (preferably multiplatform) program that will do what I want. Note that in this case I don't need to copy over a network, just local drives. Guess I could write a script but I thought something might already exist and would probably be more efficient. Thanks!
rsync.exe -tr --include "*.mp3" --include "*.flac" --include "*.wav" --include "*.ogg" --include "*.m4a" --include "*.m4b" --include "*.aac" /cygdrive/g/ /cygdrive/d/