exists command
Brian K. White
brian at aljex.com
Mon Dec 6 19:56:13 PST 2004
----- Original Message -----
From: "Dennis Malen" <dmalen at malen.com>
To: "Kenneth Brody" <kenbrody at bestweb.net>
Cc: <filepro-list at lists.celestial.com>
Sent: Monday, December 06, 2004 6:37 PM
Subject: Re: exists command
> Ken,
>
> If I am not using a dummy variable to capture the value of exists, then
> therein lies the problem.
>
> I am using:
>
> if: exists("/tmp/rnx/banco.wp") le "0"
> Then: (do something)
>
> There is no dummy variable to hold the value of exists.
>
> Am I correct?
no there is nothing wrong with the way you have it.
here is a line from a call table all my systems all use a LOT
it very definitely works
If: exists(scanimg_svpix{"/"{scanimg_dnum{"-"{scanimg_c{"."{scanimg_fmt)
gt "0"
Then: scanimg_pgs[scanimg_c]=scanimg_c<scanimg_fmt ; goto gnx
If it's not working for you then the place you need to focus attention on is
the contents of your variables and the way your expressions will resolve.
You're using the command fine, just scrutinize the data your are feeding it.
Also look at the permissions of the file in question. Maybe user filepro or
user whoever doesn't have read permissions on it? Or maybe read and execute
permissions on the directory the file is in?
Also double check what way you want to test. IE: my example above evaluates
true if the file exists.
If you want to test for true if the file doesn't exist then just pick any of
the obvious changes:
exists(file) lt "1" or exists(file) ne "1"
exists(file) le "0" should work, but I don't happen to have any examples
where I use it that way to prove it.
> Dennis
>
> ----- Original Message -----
> From: "Kenneth Brody" <kenbrody at bestweb.net>
> To: "Dennis Malen" <dmalen at malen.com>
> Cc: <filepro-list at lists.celestial.com>
> Sent: Monday, December 06, 2004 6:25 PM
> Subject: Re: exists command
>
>
>> Dennis Malen wrote:
>> >
>> > I am using the exists command in the following manner:
>> >
>> > if: exists("/tmp/rnx/banco.wp") le "0"
>> > Then: (do something)
>> >
>> > Am I using exists wrong. I have quotes in the paren. If I take the
> quotes out
>> > I get an error.
>> >
>> > If the file does not exist I want it to do something.
>>
>> The statement you have is valid, and means "if the file doesn't exist
>> [exists returns zero], or an error occurs checking if it exists [exists
>> returns less than zero]".
>>
>> We can't answer "am I using exists wrong" without knowing what you are
>> trying to do, and what "doesn't work".
>>
>> --
>>
> +-------------------------+--------------------+----------------------------
> -+
>> | Kenneth J. Brody | www.hvcomputer.com |
> |
>> | kenbrody/at\spamcop.net | www.fptech.com | #include
> <std_disclaimer.h> |
>>
> +-------------------------+--------------------+----------------------------
> -+
>> Don't e-mail me at: <mailto:ThisIsASpamTrap at gmail.com>
>>
>>
>>
>>
>
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
More information about the Filepro-list
mailing list