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
ActivityProperties
begin TDirectory.Delete('C:\...\Codolex\TestData'); end; |
Resulting code
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.
The 'Do when file exists' option provides a way to check if the file exists before trying to delete it.