Remove an assembly from the global assembly cache (GAC)

You can manage your global assemblies with the gacutil.exe which comes with Microsoft SDK. You can find this tool for instance in folder "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\".

This is an example about removing one assembly:

"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\gacutil.exe" /u Assembly.To.Uninstall

Delete folders recursively

Here is an example batch file that deletes all Delphi “__history” folders recursively:

BOF of batch file:
===========

@ECHO OFF
ECHO.

@SET DELPHI_PROJECTDIR=C:\DELPHI_PROJECTS

REM delete all __history folders recursively
FOR /D /R "%DELPHI_PROJECTDIR%" %%d IN (__history) DO (
  IF EXIST "%%d" (
    echo deleting temp directory "%%d"
    RMDIR /S /Q "%%d"
  )
)
PAUSE

===========
EOF of batch file