Does anyone have xaml file for this?

Need to create a utility workflow to delete older files and folders: Input is a spreadsheet with 2 columns: FolderLocation and NumberOfDays. Robot has to iterate through each of the row in the spreadsheet and delete all the files and folders inside the ‘FolderLocation’ value which were created before the ‘NumberOfDays’ value. For example, if "FolderLocation’ value is D:\Sample Folder\2022\ and NumberOfDays’ is 10, robot should delete all files and folders inside D:\Sample Folder\2022 which are created on or before May 8 (today’s date: May 18 - 10= May 8)

you need to delete all files which is created 10 days before today’s date right?

@aishwaryaaishu4309 Try the attached workflow below (10.6 KB)

Use for each row and within that you can use below exp in delete activity

CurrentRow(0).ToString & "\" & now.AddDays(- Cint(CurrentRow(1).ToString)).ToString("MM-dd-yyyy")
1 Like

Delete Older Files.xaml (7.4 KB)
Try This One.

Hope it helps.


1 Like

Will try

Yup Both files and folders