Press enter to see results or esc to cancel.

Delete old files on a FTP server using Azure Function

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someonePin on PinterestShare on Tumblr

Ever had a problem that a website automatically takes backup to an FTP server, the backups are just as big as 100MB and after 10 or more days your FTP is full? Well… A customer of mine just had this problem.

Backups are important to take – there is no doubt, but backups are here to help us in case of an emergency, not to make our life hard. Fortunately Azure Functions are out there and can help in such cases and in my case, it does not cost anything!

Not going to explain it more deeper, I basically created a function app that will be executed each day at 6am. The function app will connect to your FTP, find files ending with .zip and evaluate the last modified date. If the date is older than 3 days, the app will delete them. Pretty easy, isn’t it?

Check out the GitHub repository @ https://github.com/syron/Azure-Function-Delete-old-Files-FTP, feel free to comment it, fork it and improve it!

Before making this github repository, the customer was spending each day about 5-10 minutes, to do this manually, which saves them about 25-50 minutes a week and saves them a lot of headache!

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someonePin on PinterestShare on Tumblr
Comments

Leave a Comment