|
Post by Jo on Oct 25, 2015 14:06:42 GMT -5
I'm heavily using Filelists and always excluded Backup-Files (.BKP.) using -*.BKP* as in "d:\Daten\Rexx\,*.REX;-*.BKP*". Since v8.3.5295 this does not work anymore. I tried -*.BKP.* instead, but no success.
|
|
|
Post by Jo on Oct 26, 2015 10:23:38 GMT -5
These are the standard SPFLITE Backup-Files using PROFILE AUTOBKUP. The .BKP. level is inserted just bevor the filetype-suffix therefore creating files in the form "filename.BKP.suffix" when saving file "filename.suffix". Btw, the docu incorrectly says it would be the ".BAK." level. (As this was the backup-suffix some years ago...) So I also tried -*BKP* (without any dot) and this did exclude a lot of these backup-files, but not all: "JoTest_tables.BKP.asm" is still in the FM-list, shorter names are correctly excluded.
|
|
|
Post by George on Nov 10, 2015 16:32:26 GMT -5
Jo: Robert: Yes, something is rotten in the last change I made in this area. Have to go browse some code. George
Followup:
OK, this is one of those fix A, break B. Then to fix B it means breaking A again.
* means skip to the next occurrence of the following character, and that's what SPFLite has historically done
But MS in their infinite wisdom adds in a wrinkle to their support to treat *. as 'skip to last period'.
So I dutifully mimicked that, but it makes some masks very difficult now.
e.g. what you want for a mask is *;-*.BKP.* but that doesn't work now. The best alternative right now is to use *;-*BKP.*
Robert: Thoughts here?
|
|
|
Post by George on Nov 11, 2015 13:43:01 GMT -5
I think the problem is that MS expects the . to be used as the extension separator. When a . occurs elsewhere MS still looks for the . delimiting the extension. e.g. a filename of A.B.C.TXT is matched in MS land by a mask of *.TXT While previous versions of SPFLite would NOT match.
That's why the new version can't use *.BKP.* anymore to select backup files.
This is not a coding/recursion problem, it's a problem of how to DEFINE WHAT *. is to mean - The old SPFLite way or the MS way.
i.e. does * skip to the next matching mask character (strictly) or does it fudge it if the next character is a . and skip to the LAST .
We'd like to support *.TXT matching the file for the A.B.C.TXT case, but we'd also like to support *.BKP.* to filter out embedded .xxx. levels.
George
Robert: Thoughts on how we SHOULD define the * character? George
|
|
|
Post by Jo on Apr 1, 2016 16:46:48 GMT -5
I think, there is still a problem with the File Patterns. The logic in Filelists and in FileManager seems to work the same, therefore I just tested Filemanager. Selected Path: File Path/Name> d:\Daten\Rexx\Socket\ File Patterns > *.rex;-*BKP* and there are 98 *.rex Files, including 27 *.BKP.rex -Files. *.rex;-*.BKP.rex ... selects all 98 files, no file excluded by "-*.BKP.rex" *.rex;-*.BKP* ... selects all 98 files, no file excluded by "-*.BKP*" *.rex;-*BKP* ... gives best result, selects 92 files, just one file "BootpSrv.BKP.Rex" not excluded. I can't see any special in this on Filename, other filename have the same length (see dirBKP.txt). dirBKP.txt (1.56 KB) So I tried the reverse mask: File Patterns > *BKP* there are just 26 files, "BootpSrv.BKP.Rex" is missing. Jo
|
|
|
Post by George on Apr 2, 2016 11:01:08 GMT -5
Jo: Certainly looks odd. I guess another re-visit to the code is needed.
George
It seems after my previous answer (the one before your current post) we never actually DID anything, so we're still sitting at the question of "How do we interpret an *. string within the mask.
a) The * indicates we skip to the next specified character, regardless of whether it is a period or not.
or
b) The above is true except when the following character is a period, in which case we skip to the last period of the name. This is what the standard Windows filtering does, and where the current code sits.
If we use a) then masks of *.TXT would not select A.B.C.TXT Masks of *.BKP.TXT would match AAA.BKP.TXT.
If we use b) then masks of *.TXT will select A.B.C.TXT Masks of *.BKP.TXT would not match AAA.BKP.TXT.
And we sit with the issue undecided and unresolved. No matter which way we do this, the other half of the users will complain.
George
|
|
|
Post by George on Apr 9, 2016 12:40:53 GMT -5
Jo: OK, I've made a change to add some new support to the Mask string.
The * will go back to skipping to the NEXT occurrence of the following character.
A new ** is introduced which will skip to the LAST occurrence of the following character.
So to select all .TXT files without the BKP files, you would specify a mask of
**.TXT;-*.BKP.*
Next release. If you'd like to try it sooner, send me your email address and I'll send you a copy.
George
[Update] Threw out the ** option, found a way to do it with the normal *. Thanks to Robert for the idea. Preview offer still applies.
George
|
|