-
1. Re: Systematically killing ASP.NET's red-headed stepchild, the aspnet_client folder.
Jamo Oct 18, 2013 10:31 AM (in response to Aegis Kleais)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.)
c:\remove_aspnet_client.bat
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S *aspnet_client*') DO RMDIR /S /Q "%%G"
-
2. Re: Systematically killing ASP.NET's red-headed stepchild, the aspnet_client folder.
Aegis Kleais Oct 18, 2013 11:36 AM (in response to Jamo)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)
-
3. Re: Systematically killing ASP.NET's red-headed stepchild, the aspnet_client folder.
Jamo Oct 18, 2013 11:54 AM (in response to Aegis Kleais)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/
nnCron http://www.nncron.ru/

