after generating them in a folder i want to maintian the past 2 versions of the file in the folder and i have to delete the the remaining.
for example if i ran the script today and tommorow it wil generate two 5 versions of the file in the folder,if i ran the same script day after tommorw then the folder should contain the present ,past versions of the file..
the output should contain the present and last past version of the files...
the deletion should be done based on date and timestamp (as it should store the present and past one version of the files..)