Please enable JavaScript to view this site.

Codolex

Navigation: Activities > File system

Delete file/folder

Scroll Prev Top Next More

The delete file folder activity helps with deleting files or folders from the local system.

Uses System.IOUtils.TDirectory.Delete

Uses System.IOUtils.TFile.Delete

 

DeleteFileFolder

ActivityProperties

 

begin

 TDirectory.Delete('C:\...\Codolex\TestData');

end;

Resulting code

 

Folder

The 'Do when folder exists' option provides a way to check if the folder exists before trying to delete it.

When the recursive option is not checked, and the folder contains files or folders, an EInOutError error will be thrown.

 

File

The 'Do when file exists' option provides a way to check if the file exists before trying to delete it.

 

© by GDK Software