wildcard with exists?

Scott Nelson scott at logicdatasystems.com
Mon Mar 21 15:54:54 PDT 2011


On 3/21/2011 5:07 PM, Richard Kreiss wrote:
>
>> -----Original Message-----
>> From: filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com
>> [mailto:filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com] On
>> Behalf Of Scott Nelson
>> Sent: Monday, March 21, 2011 5:23 PM
>> To: Filepro-list at lists.celestial.com
>> Subject: wildcard with exists?
>>
>> I am looking for a way to test if a file exists, where that file will
> always begin
>> with a fixed first few characters, and the rest of the name be varied.  I
> have
>> tried e=exists("/pathname/file*.txt") and it does not see the file.
>>
>> Is there a way with the exists command or is there a better way?
>>
>> Scott
> Scott,
>
> Are you sure that exists() is looking in the correct place for this file?
>
> You might try setting:
>
> 	fs=chr("47")
> 	qq=fs{"pathname"{fs{"file*.txt" {""
>
> Using the debugger see of the path resolves correctly.
>
> You could also do a system called using the path to see if you are actually
> looking in the correct place before
>
> 	E=exists(qq)
>

Thanks for the reply and idea.  I tried the code you supplied above, and 
it still does not see the file using the * for part of the filename.

BTW, I am on SCO OpenServer 6 with filePro 5.014

Scott




More information about the Filepro-list mailing list