jacky wrote: I mean it seems to me you're trying too hard and complicating things where really there isn't a need for it.
I'm just trying to make it easy for the beginner to follow it, and not just users like us, ok? Hey, if I'm not seeing it clearly, what about the user of just one week? So sometimes what seems complicated for us makes it better for a newbie! I'm trying for a balance between the two.
The prefix is indeed \| including the pipe sign, but just go with it, and that it "reads" or means "is a folder, or" So if you want all folders and text files, you use indeed \|*.txt which then basically reads "is a folder, or is a text file." I don't see why this would be particularly confusing, it's actually quite simple and in the logic of how things work, I feel.
And that part right there...I have no issues with at all!
The same goes for *| only that one reads/means "is a file or". So you can use either one of those 2-chars prefixes, and then use a "standard" pattern as per XY's rules for VF. I find that less confusing that other syntaxes that would for example see the ! prefix not work the same or mean the same thing depending on how you use it.
This is where I have the real problem as I've tried to explain...I see * and think: wildcard...I think: folders first, then files based on path...I see \| and know that's: all folders...so what on earth based on those three facts would make me think that *| would mean all
files?

That's in addition to the reasons TheQwerty listed.
Simply look at *| a minute : any VF starting like that is "wrong," since it makes no sense to ask to show everything and, whatever comes next, since you already included everything. So there can't be confusion with any other VF or anything, it has to have a special meaning, and it reads simply "is a file or" much like its brother \| for folders. So the pipe sign, while part of the prefix, still has its usual meaning.
I'd say that's part of the problem...that *| looks wrong and
why should I think of that having a special meaning here? Consistency really helps...and having the filter at times be in the folder/file order and other times in file/folder order, to me, really adds to confusion..
And as TheQwerty has ponted out...what about the case where a user wants folders beginning with J or files beginning with H? How would that work? Can that be handled right now? I don't recall that it can...if so, how?
But using the idea of always prefixing the folder pattern with a \, and ending with either end-of-pattern or |, then one could have \J*|H* and that would be easily seen as J folders -or- H files, right? And this woud be consistent with existing \| as that is an implied \*|.
And then the absence of any trailing | after the initial pattern would mean that it's strictly for folders, though a trailing | could be used or required.
The only issue then is negation...that would have to handled separately, so that the ! applies at the folder
and the file portion, so that !\J*|H* would be: No J folders -or- all H files, and \J*|!H* would be All J folders -or- No H files...which would thus permit !\J*|!H* being No J folders -or- No h files.
I'm not trying to overthink this, but looking at it as it is right now, I don't see how a new user is going to follow it when the pattern flips between folder|file and file|folder, as I'm certainly not used to that latter sequence, and I think very few people would think of it either.
Using a leading \ to indicate this is the folder pattern makes sense, given that it's the typical path delim, and always having folder pattern first (if any) followed by folder pattern(s) (if any) seems foolproof in being understood by anyone, IMHO.
I'd really like some follow-up from TheQuerty or others, as I'm still trying to look at this objectively and realize that just because we've got things set one way right now (ie *|), it may not be the ultimate ideal.