View Single Post
  #2 (permalink)  
Old 08-15-2006, 10:56 PM
BuildPromoteWin's Avatar   
BuildPromoteWin BuildPromoteWin is offline
Newbie
 
Join Date: Jul 2006
Posts: 10
Credits: 0
Rep Power: 0
BuildPromoteWin is on a distinguished road
Default

It is the FileExists() function.

Here is a code sample from the help file to check if a file exists and then prompts for confirmation before deleting it:

Code:
if FileExists(FileName) then
  if MessageDlg('Do you really want to delete ' + ExtractFileName(FileName) + '?'), mtConfirmation, [mbYes, mbNo], 0, mbNo) = IDYes then 
    DeleteFile(FileName);
Reply With Quote