Delphi Programming RTL Reference|By Category|Alphabetically|By Unit
function DeleteFile(const sFileName: string): boolean;
Deletes a specified file.
DeleteFile returns False if the file specified by sFileName does not exists, or the file cannon be deleted.
var myapp : string;
myapp := 'c:\My Doucuments\mp3\my_app.old'
if not Delete(mp3File) then begin
ShowMessage('File not deleted!');
Abort;
end;
|
Deleting group of files
The code example demonstrates using the SHFileOperation function to copy a group of files and display a progress dialog. You can also use the following flags to delete, move and rename a group of files.
RenameFile
|
Free Delphi code snippet inside every Delphi Newsletter! |
|
|
|
Got some code to share? Got a question? Need some help? |
|
|