PDA

View Full Version : Search for multiple extensions at once?


element78
10-23-2003, 08:45 PM
Is that possible?

File > Search > *.BLA & *.HAH at the same time so the search doesn't have to make a whole second pass?

TJ_Tigger
10-23-2003, 09:15 PM
As far as I understand, this is not possible at this time.

yosik
10-24-2003, 05:26 AM
Wouldn't it be possible to search for files and use a double "if" statement checking extension. If extension = BLA, do one thing. If it equals SCA, do something else.
Yossi

TJ_Tigger
10-24-2003, 09:22 AM
I thought about that too, but the problem is not with checking on conditions it is with the File.Search function itself. You cannot search for more than one file extension at a time. You can use wild cards and then combine that with a double IF/ENDIF statement but the extensions are not the same. If you were searching for old rar files, for instance .rar, .r01, .r02, .r03 . . .. Then you could perform a File.Search on .r?? to find all of the above mentioned and have them saved to the string %Files%. Then you could search the string and compare the extensions and see if they matched. But the problem is that you cannot use wildcards as part of this search because none of the letters match in the two extensions, .bla and .hah.

Here is a suggestion for IR for either the next release of AMS or patch for AMS 4. Allow searches with wildcards and bracketed letters to provide a list of letters to match like in UNIX (Regular Expressioins). For instance, allow a search for ".[bh][la][ah]" This would find all of the following extensions:

.bla
.blh
.baa
.bah
.hla
.hlh
.haa
.hah

How hard would it be to implement that into the current version of AMS?

element78
10-24-2003, 01:35 PM
that would be nice tig, i believe i made a suggestion about that myself quite some time ago