Removing cached media folders

Doug Drobars wonderful tool ImageGen creates cached-folders in the media library, and these sometimes has to be removed.

This script will do that for you. Note that running this script is completely at your own risk - its advicable to backup your site in advance.

 

Using the script:

1. Copy the aspx file to your Umbraco installation

2. Add the file path to the umbracoReservedUrls-setting in web.config, e.g. to

/removeImageGenCachedFolders.aspx

3. Run the script (i.e. go to the url of the script) to list all cached folders, e.g.

www.mysite.com/removeImageGenCachedFolders.aspx

4. If you agree to delete the listed folders add ?remove=true to the path, e.g.

www.mysite.com/removeImageGenCachedFolders.aspx?remove=true

5. Remember to remove the file again your done.