For example: If the folder contains these files: log_20160801.bak log_20160802.bak log_20160803.bak log_20160804.bak log_20160805.bak log_20160806.bak How to reads the last modified date of the files and sorts them and deletes the older files: log_20160806.bak
// Load an array with the list of file names log*.bak // sort the array in descending order // delete all files with name after fifth position in array
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)