{"id":83,"date":"2012-02-04T15:44:23","date_gmt":"2012-02-04T15:44:23","guid":{"rendered":"http:\/\/pjsmith.me.uk\/?p=83"},"modified":"2023-01-26T15:10:52","modified_gmt":"2023-01-26T15:10:52","slug":"deleteafter-utility-auto-remove-old-files","status":"publish","type":"post","link":"https:\/\/pjsmith.me.uk\/index.php\/2012\/02\/deleteafter-utility-auto-remove-old-files\/","title":{"rendered":"DeleteAfter &#8211; Free utility to automatically remove old files"},"content":{"rendered":"<p>This is a utility I wrote the first version of many years ago.\u00a0 At work, we have a need to remove old files from sometimes very deep directory structures.\u00a0 This utility removes all files from a path over a certain age.\u00a0 Optionally, it scans down through the directory structure deleting any files it needs to and removing empty folders once done.\u00a0 I just recently updated this to support file pattern matching as I had a need for this.\u00a0 Useful for seeking out and removing those old log files&#8230;\u00a0 Also added a test mode, just in case!<\/p>\n<p>Feel free to make use of this.\u00a0 It is supplied as is of course, without warranty of any kind. It works fine for me and is fully trusted on important data in scripts, but if it does delete all your files, don&#8217;t shout at me&#8230;<\/p>\n<p>Windows with .Net or Linux\/Mac and Mono required.<\/p>\n<p><a title=\"DeleteAfter utility\" href=\"https:\/\/pjsmith.me.uk\/downloads\/DeleteAfter.zip\">download<\/a><\/p>\n<p><strong>Donate<\/strong><\/p>\n<p>This tool is a freebie. Feel free to download it for your own personal use. If you wish to donate, please feel free to contribute towards further development. Remember, I&#8217;ve got to eat and keep the lights on too! Maybe <a href=\"https:\/\/ko-fi.com\/pjsmith\">buy me a coffee<\/a>. Thanks for your support!<\/p>\n<p>Commercial arrangements and custom versions are available if you wish to re-distribute or use for commercial purposes. Contact me. You can view my linked in <a href=\"https:\/\/www.linkedin.com\/in\/pauljsmith2\">here <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a utility I wrote the first version of many years ago.\u00a0 At work, we have a need to remove old files from sometimes very deep directory structures.\u00a0 This&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5],"tags":[8],"class_list":{"0":"post-83","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-tech","7":"tag-tech-2"},"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/pjsmith.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/83","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pjsmith.me.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pjsmith.me.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pjsmith.me.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pjsmith.me.uk\/index.php\/wp-json\/wp\/v2\/comments?post=83"}],"version-history":[{"count":0,"href":"https:\/\/pjsmith.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/83\/revisions"}],"wp:attachment":[{"href":"https:\/\/pjsmith.me.uk\/index.php\/wp-json\/wp\/v2\/media?parent=83"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pjsmith.me.uk\/index.php\/wp-json\/wp\/v2\/categories?post=83"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pjsmith.me.uk\/index.php\/wp-json\/wp\/v2\/tags?post=83"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}