May 06, 2024, 06:17:10 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Utility to delete files based on date

Started by billhsln, May 10, 2014, 07:40:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

billhsln

I have LAN subdirectorys that end up with lots of older files that could be deleted after a certain period of time (120 days).  So, I created a program which calculates 120 days ago, allows you to pick a specific subdirectory, it will then load all the files and mark those that are more than 120 days ago.  Date shown on screen is prior to date, which can be changed manually, but MUST remain in the format shown.  You can select all or unselect all or have it rescan.  When you click DELETE it deletes all files that are marked and does not touch those that are not.  It will unselect those that it deletes and give you notice that it did delete it, it will also note those it could not delete.

Hope some one else can find this useful.

Bill
When all else fails, get a bigger hammer.

Brian

Bill,

Without deliving into the code yet, I get funny dates with your program. It may be that
I have my dates set to UK format - 13/12/2014 - will have to check

Brian


billhsln

May 13, 2014, 08:58:35 AM #2 Last Edit: May 13, 2014, 09:00:30 AM by billhsln
You are probably right about the date format.  I tend to like having dates in ccyy-mm-dd format, makes it easier to sort and do comparisons.  dd-mm-ccyy format would not allow me to do a less than correctly.

Bill
When all else fails, get a bigger hammer.