FileExists

function FileExists(const FileName: string): Boolean;

Funkcja sprawdza czy plik określony w parametrze FileName, istnieje (True) czy też nie (False).

if FileExists('C:\foo.txt') then
  DeleteFile('C:\foo.txt');


Zobacz też:

 

Kategoria: Delphi, Delphi » SysUtils, Delphi » Operacje
4programmers.net