Files delete from multiple directories

Hi All,

How to delete files from multiple folders?
There will be a main folder and multiple subfolders, so the files need to select according to the common name(eg: date will be represented for file Dec-2020-XXX, if then all Dec month files have to remove from every folder). Please help

Hey @shilpa_pa
First use directory.getdirectories and directory.getfiles to iterate through all the files.
In get files method use search pattern to get your required file names searched that are to be deleted.
Then use remove file activity to delete the files

1 Like