Is it possible to rewrite entire sub- directories and everything inside it?

Hello. First post here. Thanks for restic. I am planning to use it for my personal backups but I am stuck here. I would appreciate some help.

rewrite --exclude command seems to only work with single files. I want to rewrite an entire subdirectory.

For example: F:Stuff/Screenshots/Work

I want to delete everything inside the work folder and the work folder itself, if possible.

I tried

restic -r rclone:username:crypt --verbose rewrite --exclude F:Stuff/Screenshots/Work


restic -r rclone:username:crypt --verbose rewrite --exclude F:Stuff/Screenshots/Work/*

It did not work. I am on Windows 10.


Wait, I figured it out.


Where “foo” is the directory where the subdirectory “bar” is under.

That doc has it. I will leave it here in case someone comes looking for it too.