I created a .bat file in the root directory to identitify and remove all "aspnet_client" subdirectories. (These sub-directories appear to be created whenever there is a Windows update... so you shouldn't have to run it hourly.)
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S *aspnet_client*') DO RMDIR /S /Q "%%G"
Love it, Jamo. Sad that people have to resort to such a tactic simply because Microsoft is so myopic with this folder proliferation.
I'm not as versed in batch scripts, but is there a way you could add an array/list of absolute URLs which are "whitelisted" from being removed (for the 3rd party apps we have that use .NET and may require the folder)
I'm also not that well versed with writing loops and exception filters using the command line.
Maybe another option would be to occassionally + manually create a BAT file with a RMDIR command for each project to clean and leave out all non-.NET webroots. (The sub-directory isn't not added automatically... so you would only have to run it after an update.)
I use a Windows file manager called Total Commander (32/64 bit, Windows, free, awesome IMHO). It has a "Find Files" feature that allows the results to be fed back to the listbox. After the "aspnet_client" sub-directories are in the listbox, I use a command to "Copy Names with Path to Clipboard". I copy them to a BAT file and add the RMDIR command in front of each directory listing. (For help on RMDIR syntax, go to DOS and enter RMDIR /?) You can also use CFDirectory's delete with the "recurse" option, but I prefer not impact or be dependent on ColdFusion if I can help it. (We also tend to use nnCron instead of CFSchedule.)
Total Commander http://www.ghisler.com/