'hide files' option

Features wanted...
admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: 'hide files' option

Post by admin »

lastnikita wrote:that was it, works fine with latest build, thanks.
would be cool to be able to name them, I'll check the catalog option meanwhile..
last one, any syntax for hiding folder this way please ?
(so I can group all of those under catalog)
There is none yet. But if I'm not wrong I could add one, namely to prefix "*|" for this. Since * would be nonsense as a normal VF there are no ambiguities.

Code: Select all

\|a* = Show all folders and all files beginning with a
\|!* = Show all folders
*|a* = Show all files and all folders beginning with a
*|!* = Show all files
Good?

jjk
Posts: 202
Joined: 10 Oct 2007 20:11
Location: Paris

Re: 'hide files' option

Post by jjk »

admin wrote: Good ?
This seems perfect. TIA.
lastnikita wrote: any syntax for hiding folder this way please ?
(so I can group all of those under catalog)
According to a script of Jacky and Pagat, which applies a VF on selected files/folders

Code: Select all

    "&Filter Current Selection"
       end 0==getinfo("CountSelected"), "No selection !", 1;
       replace $sel, report('"{Name}"|', 1), "[", "[[]";
       replace $sel, $sel, "#", "[#]";
       filter $sel;
       status "Selection filtered";
you could first select only files, then apply this above VF, finally invert selection by this script

Code: Select all

::sel f;
  end 0==getinfo("CountSelected"), "No selection !", 1;
  replace $sel, report('"{Name}"|', 1), "[", "[[]";
  replace $sel, $sel, "#", "[#]";
  filter $sel;
  status "Selection filtered";
  sel i
I didn't checked it in all cases.
Waiting Don's solution which comes later, this is perhaps a workaround.

admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: 'hide files' option

Post by admin »

jjk wrote:
admin wrote: Good ?
This seems perfect. TIA.
Yep, works well! Already implemented & documented. 8) See near the bottom of this page: http://www.xyplorer.com/release_7.90.htm#0100

Upload coming...

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: 'hide files' option

Post by jacky »

admin wrote:Good?
Yeah. And just for the record, if someone is trying to show all files and only files, aka hide folders, there's no need to use any VF, just disable option "Show folders in list" under ConfigGeneral (also available on Toolbar as button "Hide Folders") and folders don't show on List. ;)
Proud XYplorer Fanatic

admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: 'hide files' option

Post by admin »

jacky wrote:
admin wrote:Good?
Yeah. And just for the record, if someone is trying to show all files and only files, aka hide folders, there's no need to use any VF, just disable option "Show folders in list" under ConfigGeneral (also available on Toolbar as button "Hide Folders") and folders don't show on List. ;)
Yep. Of course that's a global setting. The VF works tabwise.

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: 'hide files' option

Post by TheQwerty »

admin wrote:There is none yet. But if I'm not wrong I could add one, namely to prefix "*|" for this. Since * would be nonsense as a normal VF there are no ambiguities.

Code: Select all

\|a* = Show all folders and all files beginning with a
\|!* = Show all folders
*|a* = Show all files and all folders beginning with a
*|!* = Show all files
Good?
Quite frankly... no. What was wrong with the syntax I suggested?

Then you could have:

Code: Select all

\|a* = All Folders; Files beginning with a
\|!* = All Folders; No FIles
\a*|* = Folders beginning with a; All Files
\!*|* = No Folders; All Files
\a*|a* = Folders beginning with a; Files beginning with a (Is this even possible with your syntax?)
It might be a slightly longer pattern but I think it's much clearer about how the pattern is being applied, especially when used as a quick VF.

admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: 'hide files' option

Post by admin »

TheQwerty wrote:

Code: Select all

\a*|a* = Folders beginning with a; Files beginning with a (Is this even possible with your syntax?)
Sure: a* :lol:

admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: 'hide files' option

Post by admin »

admin wrote:
TheQwerty wrote:

Code: Select all

\a*|a* = Folders beginning with a; Files beginning with a (Is this even possible with your syntax?)
Sure: a* :lol:
I think the current syntax is very simple and sufficient for all practical purposes. I don't see much use in applying different patterns to folders and files. But it's good that one can now easily show all folders while filtering the files.

j_c_hallgren
XY Blog Master
Posts: 5826
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: 'hide files' option

Post by j_c_hallgren »

admin wrote:Already implemented & documented. 8) See near the bottom of this page: http://www.xyplorer.com/release_7.90.htm#0100
Comment on examples there: It's a tiny thing but if you could show the first 4 examples both as used in VF entry and AB, I think it would make it clearer...as the section talks about VF but examples are for the AB, and some users may never enter it in AB but just use VF entry.

Maybe put the AB ex first and then the VF entry to the right, with a comment in section hdg?

Also, I would put the phrase about the first "|" at end of section heading as it gets a bit lost in 1st ex text.
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: 'hide files' option

Post by TheQwerty »

admin wrote:
TheQwerty wrote:

Code: Select all

\a*|a* = Folders beginning with a; Files beginning with a (Is this even possible with your syntax?)
Sure: a* :lol:
Doh.. But "\b*|a*" isn't possible. :P
admin wrote:I think the current syntax is very simple and sufficient for all practical purposes. I don't see much use in applying different patterns to folders and files. But it's good that one can now easily show all folders while filtering the files.
I think it's very confusing to overload * with so many different meanings.

It can mean only apply the following patterns to folders.
It can be a wildcard to allow anything.
It can be in a regular expression to allow 0 or more of the last group/character.
It can be in a regular expression as itself (pointless but possible).

This makes documenting its use more difficult, and it's much more awkward for the user.
Further, if you ever do see a use in applying different patterns to files and folders, you've made it harder to take that step.

The other advantage of the syntax I suggested is it is much more inline with the rules already being applied in PFA/POM.

j_c_hallgren
XY Blog Master
Posts: 5826
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: 'hide files' option

Post by j_c_hallgren »

TheQwerty wrote:
admin wrote:

Code: Select all

\|a* = Show all folders and all files beginning with a
\|!* = Show all folders
*|a* = Show all files and all folders beginning with a
*|!* = Show all files
Good?
Quite frankly... no. What was wrong with the syntax I suggested?

Then you could have:

Code: Select all

\|a* = All Folders; Files beginning with a
\|!* = All Folders; No FIles
\a*|* = Folders beginning with a; All Files
\!*|* = No Folders; All Files
\a*|a* = Folders beginning with a; Files beginning with a 
Looking at this a nbr of times and the examples given elsewhere, and based on TheQwerty's comment re overuse of "*", I'm agreeing that the second set above makes it easier to follow, as the standard is thus "Folder|File", whereas the other way (as shown on htm#100) , it could be either way so it's more ambiguous as to what is meant, at least as I read it.

Having said that, given that asterisk represents wildcard, could one be used as alternate/optional syntax in this for folders (with their pattern being delimited by backslash to the first pipe)?
So that \|a* and \*|a* give same, as would \|!* and \*|!* ?

So the absence of the "\|" and any patterns within that would mean that the filter would apply to both folders and files...
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: 'hide files' option

Post by admin »

TheQwerty wrote:
admin wrote:
TheQwerty wrote:

Code: Select all

\a*|a* = Folders beginning with a; Files beginning with a (Is this even possible with your syntax?)
Sure: a* :lol:
Doh.. But "\b*|a*" isn't possible. :P
admin wrote:I think the current syntax is very simple and sufficient for all practical purposes. I don't see much use in applying different patterns to folders and files. But it's good that one can now easily show all folders while filtering the files.
I think it's very confusing to overload * with so many different meanings.

It can mean only apply the following patterns to folders.
It can be a wildcard to allow anything.
It can be in a regular expression to allow 0 or more of the last group/character.
It can be in a regular expression as itself (pointless but possible).

This makes documenting its use more difficult, and it's much more awkward for the user.
Further, if you ever do see a use in applying different patterns to files and folders, you've made it harder to take that step.

The other advantage of the syntax I suggested is it is much more inline with the rules already being applied in PFA/POM.
PFA/POM: "A single backslash (\) will match all folders." Well, that's in line with the current VF syntax as well.

I don't find the current syntax so awkward, and it's certainly easier to implement than yours, which is another hint that it cannot be so over-complicated as you seem to think.

BTW, currently I see no good way to exclude all folders AND filter the files. This needs yet another new prefix, !\|, e.g.

Code: Select all

!\|*.txt -> show no folders and only text files
With your syntax this would not be possible at all since the inversion operator is only implemented for the whole expression, not for each term.

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: 'hide files' option

Post by jacky »

hmm.. acc. to TheQwerty's syntax, wouldn't this show no folders and only text files ?

Code: Select all

\!*|*.txt
He doesn't seem to be using the "!" for the full pattern but one for folders and another one for files: (which means it's not like the usual way and thus could get gets confusing, one thinking it's stops at the pipe sign or something...)

Code: Select all

\|!* = All Folders; No FIles
\!*|* = No Folders; All Files
Not that I like this syntax better, or not, I'm just saying. AFAIC the current way allows for most common stuff, and to do things like exclude all folders AND filter the files I personally would use the "Hide Folders" TB icon, as for filtering files and folders differently, honestly, I don't think I ever do that.
Proud XYplorer Fanatic

admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: 'hide files' option

Post by admin »

jacky wrote:hmm.. acc. to TheQwerty's syntax, wouldn't this show no folders and only text files ?

Code: Select all

\!*|*.txt
He doesn't seem to be using the "!" for the full pattern but one for folders and another one for files: (which means it's not like the usual way and thus could get gets confusing, one thinking it's stops at the pipe sign or something...)

Code: Select all

\|!* = All Folders; No FIles
\!*|* = No Folders; All Files
Not that I like this syntax better, or not, I'm just saying. AFAIC the current way allows for most common stuff, and to do things like exclude all folders AND filter the files I personally would use the "Hide Folders" TB icon, as for filtering files and folders differently, honestly, I don't think I ever do that.
This

Code: Select all

\!*|*.txt
would not work with the current implementation or documented rules because the ! operator is applied on the term level, not the whole expression. I would have to rewrite the whole thing and the documentation. VF works as it is since many years now - I don't see the need to rewrite everything just to be able to accomplish to filter folders and files by different filters at the same time.

"Hide Folders" TB icon is okay, but as I said before, works globally. Instead, it might be nice to have a tab (or Favorite etc) pointing at TXT files and hiding all folders. This pattern (available from next version) is an easy and quite intuitive way to achieve this, I think:

Code: Select all

!\|*.txt

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: 'hide files' option

Post by jacky »

admin wrote:This

Code: Select all

\!*|*.txt
would not work with the current implementation or documented rules because the ! operator is applied on the term level, not the whole expression. I would have to rewrite the whole thing and the documentation. VF works as it is since many years now - I don't see the need to rewrite everything just to be able to accomplish to filter folders and files by different filters at the same time.
Yeah I know, but it seems to be the syntax TheQwerty was proposing, no? I was just saying that with his syntax this is how it would work (unless I got it wrong).
admin wrote:"Hide Folders" TB icon is okay, but as I said before, works globally. Instead, it might be nice to have a tab (or Favorite etc) pointing at TXT files and hiding all folders. This pattern (available from next version) is an easy and quite intuitive way to achieve this, I think:

Code: Select all

!\|*.txt
Well, just Tab, Favorites & such support scripting so it could be done anyways, just it's not tab-wise no :P ;)

So, what about

Code: Select all

!*|a*
to show no files, and only folders starting with an "a" then? You know, to be complete :mrgreen:
Proud XYplorer Fanatic

Post Reply