View Single Post
Unread 02-02-09, 09:02 PM   #1
Mera
Retired of WoW, In ESO :)
 
Mera's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 331
[Small .bat] to clean externals/embeds in one click

This batch code removes all libraries folders defined without touching at the standalone version in the addon folder root defined in %addons%.

Update the var %addon% according to your system and ready to use, update aswell libs that I have not defined there is so much I have only done what I do use.
Then to maintain them clean you can grab a subversion svn.exe and git.exe and you can aswell update all mods that have a rep in a separate batch and setting a flag to not download externals, and keep the cleanembeds bat for standalone mods you use without svn.

Code:
@ECHO OFF
SET addons=D:\Games\World of Warcraft\Interface\AddOns\
CD %addons%
SET ace2=Ace2\
SET ace3=Ace3\
SET ace3_a=AceAddon-3.0
SET ace3_b=AceConfig-3.0
SET ace3_c=AceBucket-3.0
SET ace3_d=AceComm-3.0
SET ace3_e=AceConsole-3.0
SET ace3_f=AceDB-3.0
SET ace3_g=AceDBOptions-3.0
SET ace3_h=AceEvent-3.0
SET ace3_i=AceGUI-3.0
SET ace3_j=AceHook-3.0
SET ace3_k=AceLocale-3.0
SET ace3_l=AceSerializer-3.0
SET ace3_m=AceTab-3.0
SET ace3_n=AceTimer-3.0
REM SET ace3_o=CallbackHandler-1.0
REM SET ace3_p=LibStub
SET ace2_a=AceAddon-2.0
SET ace2_b=AceComm-2.0
SET ace2_c=AceConsole-2.0
SET ace2_d=AceDB-2.0
SET ace2_e=AceDebug-2.0
SET ace2_f=AceEvent-2.0
SET ace2_g=AceHook-2.1
REM SET ace2_h=AceLibrary
SET ace2_i=AceLocale-2.2
SET ace2_j=AceModuleCore-2.0
SET ace2_k=AceOO-2.0
SET ace2_l=AceTab-2.0

SET lib_a=LibBabble-Boss-3.0
SET lib_b=LibBabble-Faction-3.0
SET lib_c=LibBabble-Zone-3.0
SET lib_d=LibSharedMedia-3.0
SET lib_e=LibBetterBlizzOptions
SET lib_f=LibAboutPanel

SET lib_g=LibBanzai-2.0
SET lib_h=LibSink-2.0
SET lib_i=LibDBIcon-1.0
SET lib_j=LibKeyBound-1.0
REM SET lib_k=LibDataBroker-1.1
SET lib_l=LibFuBarPlugin-3.0
REM SET lib_m=Dewdrop-2.0
SET lib_n=Abacus-3.0

SET lib_o=LibDogTag-3.0
SET lib_p=LibDogTag-Unit-3.0
SET lib_q=LibRock-1.0
SET lib_r=LibRockComm-1.0
SET lib_s=LibRockConfig-1.0
SET lib_t=LibRockConsole-1.0
SET lib_u=LibRockDB-1.0
SET lib_v=LibRockEvent-1.0
SET lib_w=LibRockHook-1.0
SET lib_x=LibRockLocale-1.0
SET lib_y=LibRockModuleCore-1.0
SET lib_z=LibRockTimer-1.0
SET lib_aa=LibTalentQuery-1.0
SET lib_ab=FuBarPlugin-2.0
SET lib_ac=Tablet-2.0
SET lib_ad=LibCrayon-3.0
REM SET lib_ae=LibFishing-1.0
SET lib_af=LibTourist-3.0
SET lib_ag=Deformat
SET lib_ah=Glory-2.0
SET lib_ai=Abacus-2.0
SET lib_aj=Crayon-2.0
SET lib_ak=Gratuity-2.0
SET lib_al=Compost-2.0
SET lib_am=LibBabble-Class-3.0
SET lib_an=Babble-Zone-2.2
SET lib_ao=Quixote-1.0
SET lib_ap=Sink-1.0
SET lib_aq=Tourist-2.0
SET lib_ar=SharedMedia-1.0
SET lib_as=LibHealComm-3.0
SET lib_at=LibQuickHealth-2.0
SET lib_au=LibGraph-2.0
REM SET lib_av=LibWho-2.0
REM SET lib_aw=Babble-Class-3.0
REM SET lib_ax=Babble-Race-3.0
REM SET lib_ay=Babble-Zone-3.0
REM SET lib_az=DBIcon-1.0
REM SET lib_ba=SharedMedia-3.0
REM SET lib_bb=Tourist-3.0
REM SET lib_bc=LevelGuess-1.0
SET lib_bd=LibLevelGuess-1.0
SET lib_be=LibBabble-Race-3.0
REM SET lib_bf=Graph-2.0
SET lib_bg=CompostLib
SET lib_bh=LibAbacus-3.0
SET lib_bi=CrayonLib
SET lib_bj=Deformat-2.0
SET lib_bk=DewdropLib
SET lib_bl=GloryLib
SET lib_bn=GratuityLib
SET lib_bo=LibBetterBlizzOptions-1.0
SET lib_bp=TabletLib
SET lib_bq=LibJostle-3.0

FOR /D /r %%G in (*%ace3_a%) DO IF NOT "%%G"=="%addons%%ace3%%ace3_a%" RD /S /Q "%%G"
FOR /D /r %%G in (*%ace3_b%) DO IF NOT "%%G"=="%addons%%ace3%%ace3_b%" RD /S /Q "%%G"
FOR /D /r %%G in (*%ace3_c%) DO IF NOT "%%G"=="%addons%%ace3%%ace3_c%" RD /S /Q "%%G"
FOR /D /r %%G in (*%ace3_d%) DO IF NOT "%%G"=="%addons%%ace3%%ace3_d%" RD /S /Q "%%G"
FOR /D /r %%G in (*%ace3_e%) DO IF NOT "%%G"=="%addons%%ace3%%ace3_e%" RD /S /Q "%%G"
FOR /D /r %%G in (*%ace3_f%) DO IF NOT "%%G"=="%addons%%ace3%%ace3_f%" RD /S /Q "%%G"
FOR /D /r %%G in (*%ace3_g%) DO IF NOT "%%G"=="%addons%%ace3%%ace3_g%" RD /S /Q "%%G"
FOR /D /r %%G in (*%ace3_h%) DO IF NOT "%%G"=="%addons%%ace3%%ace3_h%" RD /S /Q "%%G"
FOR /D /r %%G in (*%ace3_i%) DO IF NOT "%%G"=="%addons%%ace3%%ace3_i%" RD /S /Q "%%G"
FOR /D /r %%G in (*%ace3_j%) DO IF NOT "%%G"=="%addons%%ace3%%ace3_j%" RD /S /Q "%%G"
FOR /D /r %%G in (*%ace3_k%) DO IF NOT "%%G"=="%addons%%ace3%%ace3_k%" RD /S /Q "%%G"
FOR /D /r %%G in (*%ace3_l%) DO IF NOT "%%G"=="%addons%%ace3%%ace3_l%" RD /S /Q "%%G"
FOR /D /r %%G in (*%ace3_m%) DO IF NOT "%%G"=="%addons%%ace3%%ace3_m%" RD /S /Q "%%G"
FOR /D /r %%G in (AceTimer-3.?) DO IF NOT "%%G"=="%addons%%ace3%%ace3_n%" RD /S /Q "%%G"
REM FOR /D /r %%G in (*%ace3_o%) DO IF NOT "%%G"=="%addons%%ace3%%ace3_o%" RD /S /Q "%%G"
REM FOR /D /r %%G in (*%ace3_p%) DO IF NOT "%%G"=="%addons%%ace3%%ace3_p%" RD /S /Q "%%G"
FOR /D /r %%G in (*%ace2_a%) DO IF NOT "%%G"=="%addons%%ace2%%ace2_a%" RD /S /Q "%%G"
FOR /D /r %%G in (*%ace2_b%) DO IF NOT "%%G"=="%addons%%ace2%%ace2_b%" RD /S /Q "%%G"
FOR /D /r %%G in (*%ace2_c%) DO IF NOT "%%G"=="%addons%%ace2%%ace2_c%" RD /S /Q "%%G"
FOR /D /r %%G in (*%ace2_d%) DO IF NOT "%%G"=="%addons%%ace2%%ace2_d%" RD /S /Q "%%G"
FOR /D /r %%G in (*%ace2_e%) DO IF NOT "%%G"=="%addons%%ace2%%ace2_e%" RD /S /Q "%%G"
FOR /D /r %%G in (*%ace2_f%) DO IF NOT "%%G"=="%addons%%ace2%%ace2_f%" RD /S /Q "%%G"
FOR /D /r %%G in (*%ace2_g%) DO IF NOT "%%G"=="%addons%%ace2%%ace2_g%" RD /S /Q "%%G"
REM FOR /D /r %%G in (*%ace2_h%) DO IF NOT "%%G"=="%addons%%ace2%%ace2_h%" RD /S /Q "%%G"
FOR /D /r %%G in (*%ace2_i%) DO IF NOT "%%G"=="%addons%%ace2%%ace2_i%" RD /S /Q "%%G"
FOR /D /r %%G in (*%ace2_j%) DO IF NOT "%%G"=="%addons%%ace2%%ace2_j%" RD /S /Q "%%G"
FOR /D /r %%G in (*%ace2_k%) DO IF NOT "%%G"=="%addons%%ace2%%ace2_k%" RD /S /Q "%%G"
FOR /D /r %%G in (*%ace2_l%) DO IF NOT "%%G"=="%addons%%ace2%%ace2_l%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_a%) DO IF NOT "%%G"=="%addons%%lib_a%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_b%) DO IF NOT "%%G"=="%addons%%lib_b%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_c%) DO IF NOT "%%G"=="%addons%%lib_c%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_d%) DO IF NOT "%%G"=="%addons%%lib_d%" IF NOT "%%G"=="%addons%%lib_d%\%lib_d%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_e%) DO IF NOT "%%G"=="%addons%%lib_e%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_f%) DO IF NOT "%%G"=="%addons%%lib_f%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_g%) DO IF NOT "%%G"=="%addons%%lib_g%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_h%) DO IF NOT "%%G"=="%addons%%lib_h%" IF NOT "%%G"=="%addons%%lib_h%\%lib_h%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_i%) DO IF NOT "%%G"=="%addons%%lib_i%" IF NOT "%%G"=="%addons%%lib_i%\%lib_i%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_j%) DO IF NOT "%%G"=="%addons%%lib_j%" IF NOT "%%G"=="%addons%%lib_j%\%lib_j%" RD /S /Q "%%G"
REM FOR /D /r %%G in (*%lib_k%) DO IF NOT "%%G"=="%addons%%lib_k%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_l%) DO IF NOT "%%G"=="%addons%%lib_l%" RD /S /Q "%%G"
REM FOR /D /r %%G in (*%lib_m%) DO IF NOT "%%G"=="%addons%%lib_bk%\%lib_m%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_n%) DO IF NOT "%%G"=="%addons%%lib_bh%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_o%) DO IF NOT "%%G"=="%addons%%lib_o%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_p%) DO IF NOT "%%G"=="%addons%%lib_p%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_q%) DO IF NOT "%%G"=="%addons%%lib_q%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_r%) DO IF NOT "%%G"=="%addons%%lib_r%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_s%) DO IF NOT "%%G"=="%addons%%lib_s%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_t%) DO IF NOT "%%G"=="%addons%%lib_t%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_u%) DO IF NOT "%%G"=="%addons%%lib_u%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_v%) DO IF NOT "%%G"=="%addons%%lib_v%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_w%) DO IF NOT "%%G"=="%addons%%lib_w%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_x%) DO IF NOT "%%G"=="%addons%%lib_x%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_y%) DO IF NOT "%%G"=="%addons%%lib_y%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_z%) DO IF NOT "%%G"=="%addons%%lib_z%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_aa%) DO IF NOT "%%G"=="%addons%%lib_aa%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_ab%) DO IF NOT "%%G"=="%addons%%lib_ab%" IF NOT "%%G"=="%addons%%lib_ab%\%lib_ab%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_ac%) DO IF NOT "%%G"=="%addons%%lib_bp%\%lib_ac%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_ad%) DO IF NOT "%%G"=="%addons%%lib_ad%" RD /S /Q "%%G"
REM FOR /D /r %%G in (*%lib_ae%) DO IF NOT "%%G"=="%addons%%lib_ae%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_af%) DO IF NOT "%%G"=="%addons%%lib_af%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_ag%) DO IF NOT "%%G"=="%addons%%lib_ag%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_ah%) DO IF NOT "%%G"=="%addons%%lib_bl%\%lib_ah%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_ai%) DO IF NOT "%%G"=="%addons%%lib_ai%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_aj%) DO IF NOT "%%G"=="%addons%%lib_bi%\%lib_aj%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_ak%) DO IF NOT "%%G"=="%addons%%lib_bn%\%lib_ak%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_al%) DO IF NOT "%%G"=="%addons%%lib_bg%\%lib_al%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_am%) DO IF NOT "%%G"=="%addons%%lib_am%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_an%) DO IF NOT "%%G"=="%addons%%lib_an%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_ao%) DO IF NOT "%%G"=="%addons%%lib_ao%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_ap%) DO IF NOT "%%G"=="%addons%%lib_ap%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_aq%) DO IF NOT "%%G"=="%addons%%lib_aq%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_ar%) DO IF NOT "%%G"=="%addons%%lib_ar%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_as%) DO IF NOT "%%G"=="%addons%%lib_as%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_at%) DO IF NOT "%%G"=="%addons%%lib_at%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_au%) DO IF NOT "%%G"=="%addons%%lib_au%" IF NOT "%%G"=="%addons%%lib_au%\%lib_au%" RD /S /Q "%%G"
REM FOR /D /r %%G in (*%lib_av%) DO IF NOT "%%G"=="%addons%%lib_av%" RD /S /Q "%%G"
REM FOR /D /r %%G in (*%lib_aw%) DO IF NOT "%%G"=="%addons%%lib_am%" RD /S /Q "%%G"
REM FOR /D /r %%G in (*%lib_ax%) DO IF NOT "%%G"=="%addons%%lib_be%" RD /S /Q "%%G"
REM FOR /D /r %%G in (*%lib_ay%) DO IF NOT "%%G"=="%addons%%lib_c%" RD /S /Q "%%G"
REM FOR /D /r %%G in (*%lib_az%) DO IF NOT "%%G"=="%addons%%lib_i%" RD /S /Q "%%G"
REM FOR /D /r %%G in (*%lib_ba%) DO IF NOT "%%G"=="%addons%%lib_d%" RD /S /Q "%%G"
REM FOR /D /r %%G in (*%lib_bb%) DO IF NOT "%%G"=="%addons%%lib_af%" RD /S /Q "%%G"
REM FOR /D /r %%G in (*%lib_bc%) DO IF NOT "%%G"=="%addons%%lib_bd%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_bd%) DO IF NOT "%%G"=="%addons%%lib_bd%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_be%) DO IF NOT "%%G"=="%addons%%lib_be%" RD /S /Q "%%G"
REM FOR /D /r %%G in (*%lib_bf%) DO IF NOT "%%G"=="%addons%%lib_au%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_bg%) DO IF NOT "%%G"=="%addons%%lib_bg%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_bh%) DO IF NOT "%%G"=="%addons%%lib_bh%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_bi%) DO IF NOT "%%G"=="%addons%%lib_bi%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_bj%) DO IF NOT "%%G"=="%addons%%lib_ag%\%lib_bj%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_bk%) DO IF NOT "%%G"=="%addons%%lib_bk%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_bl%) DO IF NOT "%%G"=="%addons%%lib_bl%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_bn%) DO IF NOT "%%G"=="%addons%%lib_bn%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_bo%) DO IF NOT "%%G"=="%addons%%lib_e%\%lib_bo%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_bp%) DO IF NOT "%%G"=="%addons%%lib_bp%" RD /S /Q "%%G"
FOR /D /r %%G in (*%lib_bq%) DO IF NOT "%%G"=="%addons%%lib_bq%" RD /S /Q "%%G"
PAUSE
__________________
If you need to reach me I'm in ESO, @class101 or "Fathis Ules i"
addons: SpamBayes, BrokerCPU
projects: ThunderBayes
Mera[xeh]? - La CroisadeEcarlate (wow)

Last edited by Mera : 02-02-09 at 09:08 PM.
Mera is offline   Reply With Quote