Find NAME pattern

A forum for general AmigaOS 4.x support questions that are not platform-specific
Post Reply
JosDuchIt
Posts: 291
Joined: Sun Jun 26, 2011 5:47 pm
Contact:

Find NAME pattern

Post by JosDuchIt »

I am working on a gui (in Gui4Cli) for Find
Some questions:

1) It seems that pattern matching with Find is different than with list command

list a#? will list all filenames starting with a
find a#? lists all files having an "a " in their name (python like)
What is the character indicating the begin of the name (^ caret in python, does not work)

Are there other differences (character indicating end of string) ?

2) i did read LFORMAT is only for date and time variations; it would be more interesting to have the 'list' LFormat possibilities too. (say LFORMATD & LFORMATG) any chance?

3) what are tthe keywords WITHIN and BETWEEN for? how can they be used?
xenic
Posts: 1165
Joined: Sun Jun 19, 2011 12:06 am

Re: Find NAME pattern

Post by xenic »

@JosDuchIt
#?a#? seems to work for finding all filenames containing an a. My beef with find is that it doesn't deal with the "~" negation character correctly (but neither does findmore). For example "list ~(#?-#?)" will list all files that don't contain a hyphen ( - ) but Find just list all the files when the same pattern is used. It sure would be nice if all the system commands and utilities would treat wildard patterns in the same way.
Since you are creating a gui for find, I should ask if you are aware that Find already has a builtin gui??
AmigaOne X1000 with 2GB memory - OS4.1 FE
Post Reply