TheCleaner

Do you have a file and/or folder infestation that you need to control? Then look no further than TheCleaner. TheCleaner will not only delete any files or folders you tell it to. It will keep on doing it, over and over, and absolutely will not stop until you kill it!

[ Download .air file here ]

Here is the problem I have, or rather had: I love using Google Chrome for debugging in Flex Builder because it is very fast to launch. It’s perfect except that after a while it starts reading the cached files instead of the updated files. Which makes it pretty useless for debugging. On many occasions I found myself tweaking code, trying all sorts of things, only to figure out a few minutes later that Chrome was showing me a cached version for the past 5 minutes or so – very frustrating.

So I wrote an AIR app to solve my problem. At first it was very simple and it only deleted the Google Chrome cache folder – which was hardcoded in. Then I thought that I might want to delete other files, for whatever reason, so I did the proper thing and gave it a pathetic, yet functional, UI. Now you can enter as many files/folders to delete and tell it how often – in seconds – that you want to try and delete. And you can edit an existing entry. Data is stored in a local database file.

Seems to work pretty well. I tested it for 5 minutes and it did what I expected. You can minimize it to the System tray so that it stays out of your way. I have mine in my Startup folder so that it’s always running. It’s set on an interval of 1 second so it should only have a negligible impact on your system.

I really can’t think of any other use for it than to maybe keep your browser cache/cookies cleared no matter what.

If the file or folder in question is in use when the app tries to clean it then it just passes over and tries again on the next pass.

I can think of a few features to add. If anyone actually uses this and needs these then let me know and I’ll put it on my 2Do list:

  • Delete only files of a certain type within a folder. Like only delete the jpg files and leave everything else untouched
  • Keep track of the number of times the deletion actually takes place in the database and display it in the Datagrid
  • Improve the UI
  • Add a file-browser for inputting the path to a file/folder

Can you think of anything?

View-source is enabled. The code isn’t commented, much. And I modified it from the original simple design so there may be a few unused properties/methods laying around. I code on black in Flex Builder so the source code is pretty unreadable. You can go to the installation folder and delete the SourceStyles.css file and replace it with another – here’s mine.