[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 ?



The book suggests:

status_var = exists(file_name)

status_var will return a zero if the file exists and an operating system
specific return if it does not exist.



-----Original Message-----
From: Chandrashekhar.A.M [mailto:chandram@ZENITHSOFT.COM]
Sent: 08 March 2001 06:16
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