Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipOn 3.0 Reference - c_exist() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 C_EXIST()

 DESCRIPTION

 C_EXIST() checks for the existence of the files specified and
 reports if any file does not exist.  Up to nine files can be
 specified in the parameter list or an array of files can be given.
 The file names an also include a drive and a path specifier.  If
 the file name alone is specified, the current drive and directory
 is checked.

 SYNTAX

 C_EXIST(file1 [,file2]...[,file9])

 PARAMETERS

 file1 (C/A) is the file to check.  The file1 argument can be
 specified as a single file name or an array containing any number
 of files to check.

 file2...file9 (C) are the second through ninth files specified as
 character strings.  Note that these arguments only have meaning if
 the file1 argument is a file name and not an array.

 RETURNS

 C_EXIST() returns an empty string ("") if all files exist, otherwise
 it returns the name of the first file that does not exist.

 EXAMPLES

 ? c_exist("TEST1.DBF","TEST1.NTX") -->  && Returns "", both exist

 declare a1[3]
 a1[1] = "FILE.TXT"
 a1[2] = "C:\CONFIG.SYS"
 a1[3] = "D:\FILES\MAIN.DBF"

 r1 = c_exist(a1)         && d:\files\main.dbf does not exist
 if !empty(r1)
   ? "Aborting - File Not Found: ", r1
   quit
 endif


See Also: C_FILEINFO() C_FINDFILE() C_FINDFIRST() C_FINDNEXT()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson