Exclude folder(s) if another folder exist in the same directory

Get help for specific problems
Posts: 2
Joined: 16 Oct 2022

Alberos

Hi, is it possible to exclude folders (and its content) ONLY when another folder with predefine name exists in the same directory?

For example, consider this directory tree:
FolderA / IfThisIsHere / [files]
        / ExcludeThis / [files]
        / AlsoExcludeThis / [files]
           
FolderA / IfThisIsHere / [files]
        / ExcludeThis / [files]
           
FolderC / ExcludeThis / [files]
        / AlsoExcludeThis [files]
           
FolderD / AlsoExcludeThis [files]
From this directory tree, what should happen is:
The folder ExcludeThis and AlsoExcludeThis should only be excluded if folder IfThisIsHere is exists along side it in the same directory.

The folder (and its content) ExcludeThis and AlsoExcludeThis inside FolderA and FolderB will be excluded. But NOT the one in FolderC and FolderD because there's no IfThisIsHere folder inside C and D.

Is that possible? I just want to setup this way because things inside ExcludeThis and AlsoExcludeThis is often huge in size from thousands of tiny files combined. And it's all just some kind of a cache, it can be regenerate later. I just don't want it to take ages to copy these unnecessary data.

Thanks!
User avatar
Posts: 4867
Joined: 11 Jun 2019

xCSxXenon

It's not possible in FFS. Curiously, why would the existence of a folder negate the need to backup a cache? Backing up a cache shouldn't be necessary anyway, no?
Posts: 2
Joined: 16 Oct 2022

Alberos

Well, because if I have other folder elsewhere that its content is not a cache but it happen to be the same name as the cache folder, then that folder won't get backed up. I just want to be extra safe that this is really a cache folder by looking if there's another folder that will always be there with it be there or not. The cache folder having somewhat generic name is not helping too. I think I will just start backup that include the cache folder and forget about it then. And after 2 days it might be done haha.