hello @resticint001
you want to exclude the c:\TOBK\PICS subfolder.
Then your own examples make perfect sense that they passed and failed. Let me leave some comments next to them:
I tried the following with success:
--iexclude “*:\TOBK\PICS” >>> * can match the drive c
--iexclude “*:*\TOBK\PICS” >>> same and second * can match nothing
--iexclude “c:\TOBK\PICS” >>> full path match
--iexclude “c:/TOBK/PICS” >>> you can use / or \ and i believe | as well
But these ones did not work:
--iexclude “*:*\PICS” >>> cannot match the first subfolder
--iexclude “/TOBK/PICS” >>> cannot match the drive
--iexclude “:/TOBK/PICS” >>> cannot match the drive
Since you mentioned in your opening post that you want to “match against the relative path after c:\TOBK” then I would suggest you use this pattern:
--iexclude "*:\**\PICS
and if you want to keep the subfolder but not its content then this one (reference):
--iexclude "*:\**\PICS\*
The caveat with the first one is that if you have a PICS file somewhere in e.g. D:\some\fol\ders\PICS it will also be excluded. Since a trailing slash is ignored it seems to me restic cannot differentiate between file or folder now. From the (previous reference) there is a link to a github issue #4399