[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: how to check whether the file exists or not ?



Chandru:

Please review the following:

determines if the file, filename, exists. The function returns either a zero
(0) to indicate success or the value returned from the operating system to
indicate an error.

Syntax: stat_var        =       exists(filename)
        filename        =       text literal, column, variable, or expression.
        stat_var        =       decimal, float, or integer variable.

Example:        let #fstatus = exists($filename)

Function arguments are enclosed in parentheses and can be nested.  Arguments
referenced as x, y, and z indicate the first, second, and third argument to
a function.  Otherwise, functions take a single argument.

Paul Hoyte
Sharidionne, Inc.
(248) 559-6868
www.sharidionne.com
phoyte@sharidionne.com

-----Original Message-----
From: Discussion of SQR, Brio Technology's database reporting language
[mailto:SQR-USERS@list.iex.net]On Behalf Of Chandrashekhar.A.M
Sent: Thursday, March 08, 2001 1:16 AM
To: SQR-USERS@list.iex.net
Subject: how to check whether the file exists or not ?


hi gurus,
    can anybody tell me  how to check whether a file exists or not?
what i am doing is , i want to open a file for reading if the file exists.
now it is giveing error when i am going to open the file because it is
not there.
    thanks in advance
chandru