FileRec.SETRANGE(Path, 'C:\'); FileRec.SETRANGE("Is a File", TRUE); IF FileRec.FINDFIRST THEN REPEAT IF FileRec.Name = 'XXX.ext' THEN MESSAGE('Found It!!'); UNTIL FileRec.NEXT = 0;it will display the message.
FileRec.SETRANGE(Path, 'C:\'); FileRec.SETRANGE("Is a File", TRUE); FileRec.SETRANGE(Name, 'XXX.ext'); IF FileRec.FINDFIRST THEN REPEAT MESSAGE('Found It!!'); UNTIL FileRec.NEXT = 0;it will not find any records and nothing is displayed.
Comments
2. try this:
Regards
I have to say, I am really confused. I know the @ ignores capitalization. But I even copied the entire file name directly from Windows explorer and tried to filter on that and got nothing. Yet with the @ it works.
Why does '@XXX.ext' return a record when 'XXX.ext' does not and the file name is actually 'XXX.ext' ?? ](*,)
logically the above code should work, but the file name is case sensitive so try to give the file name exactly as same as stored in the FileRec table. hope it works then or alternatively use FILE.EXISTS(FilePath) as a last option... 8)
So if the field contains X, a filter of X does not work, but @X does.
On a serverconnection i found out for some years that i must use the @. Why? Never searched for the reason ..... Sorry. Maybe it's depending on the serversetting / databasesetting on the server (Codepage).