Warning: include(../mainbanner.htm) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/delphibasics/fileexists.php on line 34

Warning: include(../mainbanner.htm) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/delphibasics/fileexists.php on line 34

Warning: include() [function.include]: Failed opening '../mainbanner.htm' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/makedata/public_html/delphibasics/fileexists.php on line 34

Warning: include(../left.htm) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/delphibasics/fileexists.php on line 55

Warning: include(../left.htm) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/delphibasics/fileexists.php on line 55

Warning: include() [function.include]: Failed opening '../left.htm' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/makedata/public_html/delphibasics/fileexists.php on line 55
Delphi Basics

FileExists procedure

Check availability of a file. Return true if file was exist.

Unit
SysUtils

Syntax:
function FileExists(const FileName: string): Boolean;

Where F is a file variable that has been opened.

example:

procedure TForm1.Button1Click(Sender: TObject);
var
 ..
 FileName: string;
  ..
begin
  FileName:= 'c:\test.dat';
  if not FileExists(FileName) then
  begin
    ShowMessage('File not found.');
    exit;
  end else
  begin
    ...
  end;
end; 

back to top


Warning: include(../right.htm) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/delphibasics/fileexists.php on line 130

Warning: include(../right.htm) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/delphibasics/fileexists.php on line 130

Warning: include() [function.include]: Failed opening '../right.htm' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/makedata/public_html/delphibasics/fileexists.php on line 130


Warning: include(../ulink180x90.php) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/delphibasics/fileexists.php on line 133

Warning: include(../ulink180x90.php) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/delphibasics/fileexists.php on line 133

Warning: include() [function.include]: Failed opening '../ulink180x90.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/makedata/public_html/delphibasics/fileexists.php on line 133


Warning: include(../bottombanner.htm) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/delphibasics/fileexists.php on line 147

Warning: include(../bottombanner.htm) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/delphibasics/fileexists.php on line 147

Warning: include() [function.include]: Failed opening '../bottombanner.htm' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/makedata/public_html/delphibasics/fileexists.php on line 147