I'm using rsync to load my mp3 player with music from a text file, and as such I'd like to delete extraneous files that aren't included in the "files-from" list. (Say if I no longer want a particular song on the music player and remove it from the playlists.)
However, simply using any of the delete options doesn't seem to work (--delete, --delete-during, etc.) I tried excluding everything else (--exclude="*.*") but that also did not remove extraneous files from the destination. The current command I'm using is.
rsync -vi --ignore-existing --files-from="~/include.txt" ~ ~/TestFolder/
At first I had used all the typical rsync options (-aR etc, but they seem to do nothing when syncing from a files-from list) so I removed them. And I'm just using verbose and itemize changes for testing purposes so I can see what's going on. I tried adding -r with --delete, but that doesn't work either. I also tried (--delete-excluded --exclude="*.*").
I suppose I could generate a list of files to delete then specifically delete them... but isn't that what rsync SHOULD do?