Hi,
as you can see in the title i try to sync a folder with a list of files. I hoped that this command would delete all files in dest/ that are not on the list, but it didn't.
So i searched a little bit and know now, that rsync can't do this.
But i need it, so do you know any way to do it?
PS: The list is created by a python script, so it is imaginable that your solution use some python code.
EDIT, let's be concrete:
The list looks like this:
/home/max/Musik/Coldplay/Parachutes/Trouble.mp3
/home/max/Musik/Coldplay/Parachutes/Yellow.mp3
/home/max/Musik/Coldplay/A Rush of Blood to the Head/Warning Sign.mp3
/home/max/Musik/Coldplay/A Rush of B-Sides to Your Head/Help Is Around the Corner.mp3
/home/max/Musik/Coldplay/B-Sides (disc 3)/Bigger Stronger.mp3
and the command like this:
rsync --delete --files-from=/tmp/list / /home/max/Desktop/foobar/
This works, but if i delete a line, it is not deleted in foobar/.
EDIT 2:
rsync -r --include-from=/tmp/list --exclude=* --delete-excluded / /home/max/Desktop/foobar/
That work neither ...