How do I delete everything in a remote folder except a certain other folder? For example, if I have:
Music/
Music/Pop/...
Music/Jazz/..
Music/Rock/..
And I want to delete everything, but the Rock
folder. I've tried this:
rclone --filter="- Pop/" --filter="+ *" delete b2:media/Music
But that that wants to delete everything. Reversing the -/+ on filter results in no operation happening at all.
ncw
(Nick Craig-Wood)
#2
This should do it - delete everything but the Pop
folder
rclone --dry-run --filter="- Pop/**" --filter="+ *" delete b2:media/Music
Use rclone ls with the same params to test out
rclone --filter="- Pop/**" --filter="+ *" ls b2:media/Music
system
(system)
closed
#4
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.