Page 2 of 2
Re: Problems with List command
Posted: Sun Nov 24, 2013 8:18 am
by thomasrapp
colinw wrote: % Matches 0 characters always. Useful as in "(foo|bar|%)".
I don't see the use of the % sign. (foo|bar|) works as well. Combinations with other patterns like #% do not make much sense, too.
'#'? matches only the literal string "#?"
This explanation is wrong IMHO. It matches the literal # followed by any single character because only the # is escaped the ? should be interpreted as pattern.
Any of the above characters used in a pattern name usually cause "issues" and requires the use of the
neutralizing character ' to disarm them when part of a filesystem object name itself.
That's useless advice in case of List because the user has no means to insert ' characters if the pattern is read from the file system by MatchNext(). MatchNext() needs to be fixed.
Re: Problems with List command
Posted: Sun Nov 24, 2013 8:27 pm
by nbache
thomasrapp wrote:colinw wrote:
'#'? matches only the literal string "#?"
This explanation is wrong IMHO. It matches the literal # followed by any single character because only the # is escaped the ? should be interpreted as pattern.
I see an apostrophe also in front of the question mark, so I believe Colin is right.
Any of the above characters used in a pattern name usually cause "issues" and requires the use of the
neutralizing character ' to disarm them when part of a filesystem object name itself.
That's useless advice in case of List because the user has no means to insert ' characters if the pattern is read from the file system by MatchNext().
Which - I guess - is one of the aforementioned "issues" and a good reason to avoid using those characters in filenames.
MatchNext() needs to be fixed.
To do what?
Beast regards,
Niels
Re: Problems with List command
Posted: Sun Nov 24, 2013 10:51 pm
by thomasrapp
see an apostrophe also in front of the question mark, so I believe Colin is right.
I don't see much this week because my glasses are broken. So yes, if there is an apostrophe in front of the ? then it should be escaped, too.
To do what?
To not parse file names encountered during directory read for pattern characters.
The user can input something like SYS:#?/Monitors with the intention to find SYS:Devs/Monitors and SYS:Storage/Monitors. Now if MatchNext() finds SYS:Devs(deactivated)/Monitors in the file system it should take it just like this and enter the directory. It should not try to find pattern characters in the file name.
It should match the file against the pattern and not the other way round. I don't see a reason why it would need to parse the file name. There cannot be partterns in file names. File names have to be unique.
Re: Problems with List command
Posted: Mon Nov 25, 2013 9:40 pm
by nbache
thomasrapp wrote:The user can input something like SYS:#?/Monitors with the intention to find SYS:Devs/Monitors and SYS:Storage/Monitors. Now if MatchNext() finds SYS:Devs(deactivated)/Monitors in the file system it should take it just like this and enter the directory. It should not try to find pattern characters in the file name.
It should match the file against the pattern and not the other way round. I don't see a reason why it would need to parse the file name. There cannot be partterns in file names. File names have to be unique.
This is exactly what it does, as far as I can see.
I cloned my SYS:Devs to SYS:Devs(deactivated) and did a List SYS:#?/Monitors, and it showed me the following:
Code: Select all
Kataloget "SYS:Devs(deactivated)" - Mandag 25-Nov-13
Monitors Kat ----rwed 05-Dec-12 19:50:11
1 katalog - 2 blokke benyttet
Kataloget "SYS:Storage" - Mandag 25-Nov-13
Monitors Kat ----rwed 01-Jan-78 02:01:14
1 katalog - 2 blokke benyttet
Kataloget "SYS:Devs" - Mandag 25-Nov-13
Monitors Kat ----rwed 05-Dec-12 19:50:11
1 katalog - 2 blokke benyttet
To be sure, I tried it on my public release partition (not the beta one), and it does work.
I'm not sure whether this is a recent fix, but it should work like this for you too (if your system is up to date).
Best regards,
Niels
Re: Problems with List command
Posted: Tue Nov 26, 2013 12:19 pm
by thomasrapp
Try with the ALL keyword as in the original post.
Re: Problems with List command
Posted: Tue Nov 26, 2013 9:23 pm
by nbache
Ah ...
Missed that part - sorry.
Code: Select all
> List SYS:#?/Monitors all
Kataloget "SYS:Devs(deactivated)" - Tirsdag 26-Nov-13
Monitors Kat ----rwed 05-Dec-12 19:50:11
1 katalog - 2 blokke benyttet
Kataloget "SYS:Storage" - Tirsdag 26-Nov-13
Monitors Kat ----rwed 01-Jan-78 02:01:14
1 katalog - 2 blokke benyttet
Kataloget "SYS:Devs" - Tirsdag 26-Nov-13
Monitors Kat ----rwed 05-Dec-12 19:50:11
1 katalog - 2 blokke benyttet
LIST: Ingen oplysninger om "SYS:Devs(deactivated)/Monitors".
LIST: objektet findes ikke
I ALT: 3 kataloger - 6 blokke benyttet
I agree - this looks strange.
Best regards,
Niels
Re: Problems with List command
Posted: Wed Nov 27, 2013 7:36 pm
by JosDuchIt
@nbache
Did you also note my observation valid for tests with the ALL keyword
The curious thing is this
- when i compose a litigious name to save under, Notepad accepts it and list recognizes it correctly (
- i can type in the exact litigious names i did find on my HD and save them to ram: or a subfolder: list will acceppt them
- when i save to ram: the folders in which i did find the litigious name "list"chokes on it
I did not test this on dir names, but i don't see why this would be different.
You can copy the names i tested below & give them to a directory or a file, that's what i did too, to be sure
« _Audio/AMC/Themes/Default (16-9_LessFX) »
« Cinnamon_Writer_0.801/Dictionary/English|en-uk ».
In the first you can think some non standard blank character replaced the correct "blank"
I doubt this to be the case for the "|" character
So yes i think in some cases even with ALL list works as it should and in other cases not, depending on how the name was registered.