Ignore folder except 1 subfolder

Hello,

What ignore pattern would ignore the subfolder \AppData except for \AppData\ThisFolder

I have tried combinations of:

\AppData

!\AppData\ThisFolder

and

!\AppData\ThisFolder

\AppData

But it just ignores ‘ThisFolder’ regardless.

/AppData/*
!/AppData/ThisFolder

Thanks but unfortuantely that didn’t work. Initially (with the forward slashes), I just got a blank AppData folder in the snapshot. When replacing with backslashes (\) that I presume Windows prefers, it snapshots the whole AppData folder, which I don’t need.

I should probably clarify that the folder I do want is actually in Roaming:

\AppData*
!\AppData\Roaming\ThisFolder

Windows might require backslashes indeed. I am not familiar with this OS.

But otherwise you got what you asked for:) Be precise when you ask for help. Nobody can see your screen.

For your new requirement what you need is:

/AppData/*
!/AppData/Roaming
/AppData/Roaming/*
!/AppData/Roaming/ThisFolder

Kopia is using git style exclusions. Google if you need more details.