exists or similar command to work like grep on file system files
Kenneth Brody
kenbrody at spamcop.net
Wed Feb 12 07:54:46 PST 2014
On 2/11/2014 11:19 PM, James Flanagan wrote:
> Server: FreeBSD 9.2 Filepro: 5.7.0.4
>
> I am looking a way to have filepro verify whether a file exists using
> only a partial file name (like grep). This will be used with photographs
> from all sorts of cameras so instead of trying to account for every
> possible camera filename structure, i would like to be able to supply
> filepro with 3-4 numbers and a directory and have filepro determine if a
> file with that number exists in a file name. that will be accurate
> enough for what i need the code to do.
[...]
> [root at filepro a]# ls
> IMGP0997.JPG IMGP0999.JPG IMGP1001.JPG IMGP1003.JPG
> IMGP0998.JPG IMGP1000.JPG IMGP1002.JPG IMGP1004.JPG
>
> ::aa="0998": :exists("/tmp/a/*"{aa{"*") eq "1":msgbox aa<"exists":
[...]
As you see, EXISTS() needs a filename, not a wildcard mask.
Check out OPENDIR().
--
Kenneth Brody
More information about the Filepro-list
mailing list