How to delete unnecessary/old files from a folder using LINQ in UiPath

Problem statement — We need to remove the old/outdated files which hasn’t been accessed for the last 6 month from a folder

Drag Assign activity to the workflow and write the following code

Here is the link to YouTube Video: How to delete unnecessary/old files from a folder using LINQ in UiPath - YouTube

Code: UiPathSamples/25 - DeleteOldFilesUsingLINQ at main · manojbatra071/UiPathSamples · GitHub

Medium:How to delete unnecessary/old files from a folder using LINQ in UiPath - Manoj Batra - Medium

Happy Automation