setting "ShowFolderSizeInList"; must be considered so your code does not apply, sorry for any confusion.
mm, hope you have the patience, let's try another way:
Code: Select all
<curpath>\Folder 1 - has empty files inside - allowed, will trigger
<curpath>\Folder 2 - has empty files and folders - allowed, will trigger
<curpath>\Folder 3 - has empty folders - allowed, will trigger
<curpath>\Folder 4 - has nothing - allowed, will trigger
<curpath>\Folder 5 - has files with size != 0 in any sublevel, not allowed, will not trigger
situation 2:
Code: Select all
<curpath>\Folder 1 - has empty files inside - NOT allowed, will NOT trigger
<curpath>\Folder 2 - has empty files and folders - NOT allowed, will NOT trigger
<curpath>\Folder 3 - has empty folders - NOT allowed, will NOT trigger
<curpath>\Folder 4 - has nothing - allowed, will trigger
<curpath>\Folder 5 - has files with size != 0 in any sublevel, NOT allowed, will NOT trigger
situation 3:
Code: Select all
<curpath>\Folder 1 - has empty files inside - NOT allowed, will NOT trigger
<curpath>\Folder 2 - has empty files and folders - NOT allowed, will NOT trigger (because of empty files' rule)
<curpath>\Folder 3 - has empty folders - allowed, will trigger
<curpath>\Folder 4 - has nothing - allowed, will trigger
<curpath>\Folder 5 - has files with size != 0 in any sublevel, not allowed, will not trigger
situation 4:
Code: Select all
<curpath>\Folder 1 - has empty files inside - allowed, will trigger
<curpath>\Folder 2 - has empty files and folders - NOT allowed, will NOT trigger (because of empty folders' rule, next)
<curpath>\Folder 3 - has empty folders - NOT allowed, will NOT trigger
<curpath>\Folder 4 - has nothing - allowed, will trigger
<curpath>\Folder 5 - has files with size != 0 in any sublevel, not allowed, will not trigger
What I'm doing is extending a script of mine which currently deals with files only but now I must work on folders either and there's no general rule, that's why I'll have to implement parameters to each of those 4 situations I described. Thanks for the help, highend!