• Visit Rebornbuddy
  • Clearing your HB and WoW cache for dummies

    Discussion in 'Honorbuddy Forum' started by RobertPaulson, Mar 11, 2013.

    1. dirttrack

      dirttrack Member

      Joined:
      Dec 20, 2011
      Messages:
      33
      Likes Received:
      0
      Trophy Points:
      6
      Thanks for the reply. Mario it takes about 5 to 10 mins of work and turns it to 10 sec when everything is setup right. My last question is how do I go about finding the the svn's were updated?
       
    2. RobertPaulson

      RobertPaulson Member

      Joined:
      Jun 2, 2012
      Messages:
      56
      Likes Received:
      6
      Trophy Points:
      8
      Take the -q off the SVN lines;-).

      Also thank you dirttrack and the other folks that have chimed in with answers for folks questions, for such a simple batch (cmd) file this got me a lot of pm's and questions lol.

      For those wanting to know if you can make this work for multiple HB installations, yes, if you add the variables and copy/edit the file to match. I actually have 4 HB installations that I keep synced this way, well I use the cmd file to sync 3. I will paste MY exact version as an example, this works for me and should for anyone else that changes the directories/local to match.

      There are better solution's with the batch cmd file, however it would involve a LOT of extra stuff to make it completely autonomous. Adding in recursive If/For/Set/Loop/Goto statements can get messy quick in a batch file, I may do it one day if I'm bored.

      Here is my EXACT cmd file that I use several times a day that works very well for me at least. I only put all the >nul and -q and If statements in here when trying to make it more simple for others, I personally don't mind seeing the "File doesn't exist" messages, and removing the -q on the SVN line makes it so I can see what version of each item updated I'm on, and when it actually gets an update. The following has NOT been tweaked at all to do extra checks for proper paths and what not, as I know mine are set right, I am posting as an example for the folks that want to modify it for there own installs.
       

      Attached Files:

    3. dirttrack

      dirttrack Member

      Joined:
      Dec 20, 2011
      Messages:
      33
      Likes Received:
      0
      Trophy Points:
      6
      Still having a little trouble

      This is what I came up with after moding the one your posting. It says its skipping the svn when I use it.

      @echo off
      REM -- Change the following two set lines to reflect your actual WoW and HonorBuddy BASE directories!
      set WoW_Dir=C:\Program Files (x86)\World of Warcraft
      set WoW_Dir=C:\Program Files (x86)\World of Warcraft d
      set HB_Dir1=C:\Program Files (x86)\Toolbox D
      set HB_Dir2=C:\Program Files (x86)\Toolbox Dailys
      set HB_Dir3=C:\Program Files (x86)\Toolbox J
      set WoW_Local=enUS
      cls

      REM Leave the below alone unless you know what your doing
      Echo WoW directory set to %WoW_Dir%
      Echo HonorBuddy directory(s) set to %HB_Dir1%, %HB_Dir2%, %HB_Dir3%
      Echo .
      Echo ..
      Echo ...
      Echo Deleting Cache
      del /q "%WoW_Dir%\Errors\*.*" >nul
      If exist "%WoW_Dir%\Cache\WDB\%WoW_Local%\creaturecache*.wdb" del /q "%WoW_Dir%\Cache\WDB\%WoW_Local%\creaturecache*.wdb"

      del /q "%HB_Dir1%\Cache\*.*" >nul
      del /q "%HB_Dir1%\logs\*.*" >nul
      del /q "%HB_Dir1%\CompiledAssemblies\*.*" >nul

      del /q "%HB_Dir2%\Cache\*.*" >nul
      del /q "%HB_Dir2%\logs\*.*" >nul
      del /q "%HB_Dir2%\CompiledAssemblies\*.*" >nul

      del /q "%HB_Dir3%\Cache\*.*" >nul
      del /q "%HB_Dir3%\logs\*.*" >nul
      del /q "%HB_Dir3%\CompiledAssemblies\*.*" >nul
      Echo .
      Echo ..
      Echo ...
      Echo Updating SVN %HB_Dir1%, Please wait...
      Echo .
      svn update %HB_Dir1%\Routines\*.*
      Echo ..
      svn update %HB_Dir1%\Bots\*.*
      Echo ...
      svn update %HB_Dir1%\Plugins\*.*

      Echo Updating SVN %HB_Dir2%, Please wait...
      Echo .
      svn update %HB_Dir2%\Routines\*.*
      Echo ..
      svn update %HB_Dir2%\Bots\*.*
      Echo ...
      svn update %HB_Dir2%\Plugins\*.*

      Echo Updating SVN %HB_Dir3%, Please wait...
      Echo .
      svn update %HB_Dir3%\Routines\*.*
      Echo ..
      svn update %HB_Dir3%\Bots\*.*
      Echo ...
      svn update %HB_Dir3%\Plugins\*.*

      Echo Errors, Logs, Cache Cleared, and SVN updated...
      pause
      exit
       
    4. RobertPaulson

      RobertPaulson Member

      Joined:
      Jun 2, 2012
      Messages:
      56
      Likes Received:
      6
      Trophy Points:
      8

      Thats what would normally happen if you don't have a wildcard listed. In other words

      Code:
      [COLOR="#00FF00"]svn update %HB_Dir3%\Routines\*.*[/COLOR]
      
      Should work. But this

      Code:
      [COLOR="#FF0000"]svn update %HB_Dir3%\Routines[/COLOR]
      
      Will not. It will say Skipped one directory meaning it didn't understand Routines held other SVN's.

      Another time it will "Skip" things is when you have a directory, like this Routines example with "extra" non SVN Directories mixed in. It will of course skip them.

      Another reason it might say this is if you have a modified file in your SVN directory, or some other "Conflict" going on. In that case I'd just go into Windows Exploder and try to finger it out. Most likely just wiping the SVN clean and starting fresh would fix those things.

      And lastly I didn't take into account SVN's that may have logins, which I do, and the irony is it still works, so I'm guessing without looking that the login is cached in the hiden .svn file in each SVN directory... An "svn update help" shows this format for logging in, just add the commands like so:

      svn update --username ImABoss --password MyLittleSecret %HB_Dir3%\Routines\DirWithTheLogin

      Note the highlighted directory is explicit (not wildcard recursed), and would have to be added changed for each SVN that needed it.

      Hope that helps;-)

      PS, I would add in "echo %HB_Dir1%" and so on for each directory right before the svn update line. Then you should be able to see that your directories didn't getted messed up by accident.

      PSPS, lol, I just noticed that your variables have white space in them. While this sometimes works (depends on if cmd extensions are enabled) you might try quoting them. By Echoing as I said above you should see what is getting sent to the svn command.

      Your %WoW_Dir% is listed twice, with the second one with a " d" on the end. That would mess that up;-)
       
      Last edited: Mar 14, 2013
    5. dirttrack

      dirttrack Member

      Joined:
      Dec 20, 2011
      Messages:
      33
      Likes Received:
      0
      Trophy Points:
      6
      The quotes around the hb locations fixed the issue with updating the svns. I am playing around with it some more to update my profile folder. Where do you get info on program commands? I have no clue where to go and am just figuring out by trial and error right now.
      Edit this is what I am using now. I want to make it delete the cache folder in the wow directory and in the data directory too. How would I go about that? I made an attempt but it doesn't work yet.
      @echo off
      REM -- Change the following two set lines to reflect your actual WoW and HonorBuddy BASE directories!
      set WoW_Dir1=C:\Program Files (x86)\World of Warcraft
      set WoW_Dir2=C:\Program Files (x86)\World of Warcraft J
      set HB_Dir1="C:\Program Files (x86)\Toolbox D"
      set HB_Dir2="C:\Program Files (x86)\Toolbox Dailys"
      set HB_Dir3="C:\Program Files (x86)\Toolbox J"
      set HB_Dir4="C:\Program Files (x86)\Profiles and what not"
      set WoW_Local=enUS
      cls

      REM Leave the below alone unless you know what your doing
      Echo WoW directory(s) set to %WoW_Dir1%, %WoW_Dir2%
      Echo HonorBuddy directory(s) set to %HB_Dir1%, %HB_Dir2%, %HB_Dir3%, %HB_Dir4%
      Echo .
      Echo ..
      Echo ...
      Echo Deleting Cache
      echo %WoW_Dir1%

      del /q "%WoW_Dir1%\Errors\*.*" >nul
      del /q /s "%WoW_Dir1%\Cache\*.*" >nul
      del /q /s "%WoW_Dir1%\DATA\Cache\*.*" >nul
      If exist "%WoW_Dir1%\Cache\WDB\%WoW_Local%\creaturecache*.w db" del /q "%WoW_Dir1%\Cache\WDB\%WoW_Local%\creaturecache*.w db"

      echo %WoW_Dir2%

      del /q "%WoW_Dir2%\Errors\*.*" >nul
      del /q /s "%WoW_Dir2%\Cache\*.*" >nul
      del /q /s "%WoW_Dir2%\DATA\Cache\*.*" >nul
      If exist "%WoW_Dir2%\Cache\WDB\%WoW_Local%\creaturecache*.w db" del /q "%WoW_Dir2%\Cache\WDB\%WoW_Local%\creaturecache*.w db"

      del /q "%HB_Dir1%\Cache\*.*" >nul
      del /q "%HB_Dir1%\logs\*.*" >nul
      del /q "%HB_Dir1%\CompiledAssemblies\*.*" >nul

      del /q "%HB_Dir2%\Cache\*.*" >nul
      del /q "%HB_Dir2%\logs\*.*" >nul
      del /q "%HB_Dir2%\CompiledAssemblies\*.*" >nul

      del /q "%HB_Dir3%\Cache\*.*" >nul
      del /q "%HB_Dir3%\logs\*.*" >nul
      del /q "%HB_Dir3%\CompiledAssemblies\*.*" >nul
      Echo .
      Echo ..
      Echo ...
      Echo Updating SVN %HB_Dir1%, Please wait...
      Echo .
      svn update %HB_Dir1%\Routines\*.*
      Echo ..
      svn update %HB_Dir1%\Bots\*.*
      Echo ...
      svn update %HB_Dir1%\Plugins\*.*

      Echo Updating SVN %HB_Dir2%, Please wait...
      Echo .
      svn update %HB_Dir2%\Routines\*.*
      Echo ..
      svn update %HB_Dir2%\Bots\*.*
      Echo ...
      svn update %HB_Dir2%\Plugins\*.*

      Echo Updating SVN %HB_Dir3%, Please wait...
      Echo .
      svn update %HB_Dir3%\Routines\*.*
      Echo ..
      svn update %HB_Dir3%\Bots\*.*
      Echo ...
      svn update %HB_Dir3%\Plugins\*.*

      Echo Updating SVN %HB_Dir4%, Please wait...
      Echo .
      svn update %HB_Dir4%\profiles\*.*
      echo..

      Echo Errors, Logs, Cache Cleared, and SVN updated...
      pause
      exit
       
      Last edited: Mar 15, 2013
    6. wearloga

      wearloga New Member

      Joined:
      Mar 16, 2012
      Messages:
      59
      Likes Received:
      0
      Trophy Points:
      0
      Hey again,

      I decided to sent you the output I get from the cmd:
      That last line is "Press any key to continue"

      The thing I want to know is what get's updated by the SNV part? This program is done within the second I start it, so it can't have very well gone and updated anything, right?
      I also tried the file you posted a few messages above this one, but then I get
      I think that is because there is no SNV directory set, or something, like in the one you posted on the first page here, but I could be wrong there. I can sort of "read" the code and more or less figure out what it's supposed to do, but I have no idea what it needs to work :p

      kind regards,
      Wearloga
       
    7. RaihaX

      RaihaX New Member

      Joined:
      Jun 14, 2012
      Messages:
      31
      Likes Received:
      0
      Trophy Points:
      0
    8. justfortrade

      justfortrade New Member

      Joined:
      Jan 15, 2010
      Messages:
      18
      Likes Received:
      0
      Trophy Points:
      0
      Uhm, i have a so noob question, why we have to delet cache for both wow and HB? can anyone answer my question?
       
    9. RaihaX

      RaihaX New Member

      Joined:
      Jun 14, 2012
      Messages:
      31
      Likes Received:
      0
      Trophy Points:
      0
    10. chinajade

      chinajade Well-Known Member Moderator Buddy Core Dev

      Joined:
      Jul 20, 2010
      Messages:
      17,540
      Likes Received:
      172
      Trophy Points:
      63
      Hi, Jestfortrade,

      Clearing caches solves the problems described here: HelpDesk: Cache corruption problems

      cheers,
      chinajade
       
    11. justfortrade

      justfortrade New Member

      Joined:
      Jan 15, 2010
      Messages:
      18
      Likes Received:
      0
      Trophy Points:
      0
      oh, i see. I've encountered these problems frequently but don't know the exactly reason, now i will focus on this topic to solve them, thank you so much guys.
       
    12. dirttrack

      dirttrack Member

      Joined:
      Dec 20, 2011
      Messages:
      33
      Likes Received:
      0
      Trophy Points:
      6
      I clean out the 2 in the wow directory and the hb one every day. I had many issues playing wow before botting that was caused by bad cache, it became a regular habit to delete the files.
       
    13. Webtechi

      Webtechi New Member

      Joined:
      Jan 6, 2012
      Messages:
      20
      Likes Received:
      1
      Trophy Points:
      0
      I also have this as part of my startup bat files

      echo y | rmdir /s "C:\World of Warcraft\Interface\Addons"
      echo y | mklink /j "C:\World of Warcraft\Interface\Addons" "C:\Path\To\Addons"

      NOTE: if you use this it WILL delete your current addons directory so back it up if you don't want to lose it

      What it does is delete the current addons directory and links an external directory for my addons so I can keep them seperate depending on what I am doing.
      Some people (most) will probably find this excessive but I've found it helps a lot with lag issues if I keep auctioneer and other large addons out of memory when I am not intending to use them.

      I have bat files for raiding and for selling and so on so I only have the addons I need for each circumstance.
       
    14. RobertPaulson

      RobertPaulson Member

      Joined:
      Jun 2, 2012
      Messages:
      56
      Likes Received:
      6
      Trophy Points:
      8
      Thats cool, I do very similar things with symlinks for the same reason. Works very well.
       
    15. RobertPaulson

      RobertPaulson Member

      Joined:
      Jun 2, 2012
      Messages:
      56
      Likes Received:
      6
      Trophy Points:
      8
      Thinking you don't have the Tortoise CMD line tools installed. Open a CMD prompt and type svn and hit enter, if it says no program found blabla then you need to install the CMD line tools (option in the Tortoise install).

      Anyone trouble shooting this should do this, open a CMD prompt and type in (using YOUR Directories):
      Code:
      svn update C:\HB_Dir\Routines\*.*
      
      This will show you EXACTLY what happens verbosely. If there are skipped items, they are normally non SVN directories. You should be able to narrow it down by doing this.

      You can do the same manually for the Bots directory and the Pluggins directory.


      Hey man, I can point you as someone else already did to ss64.com, there are many other sites for windows CMD and Batch files in general. If your really intrested in learning more, Google about cmd line pipes, redirects, and echo as well, that will explain what ">, >>, <, |" does as well. I won't post the whole command here as some bonehead will smoke his whole install and then freak out lol, but you can start by looking at the following cmds. Type them with a /? in most cases to get more help on syntax. For your specific question, if the Directory your trying to delete has folders below it, del won't work as expected, even with the recursive option. It will delete the FILES but not the Directories.
      set << The way to see your basic windows environment variables, if you create a new one in a cmd line window YOU opened, it will not be there for other proccess's to see (unless you do some trickery).
      del
      rmdir or rd
      mkdir or md
      xcopy or even better
      robocopy
      deltree (sadly removed in newer versions of Windoze)
      where
      and a TON of others...

      The following does exactly what you want, but with the windows USER Temp directory. This should not ever hurt anything, however if your computer ships itself to another country, smokes, blows up, ejaculates it's not my fault;-). You may need an administrative cmd line for this, in which cast make a shortcut type cmd for the name and cmd for what to run, then right click on the new shortcut, click properties, Compatibility, Run as Administrator...

      IT WILL NOT ASK FOR PERMISSION, TO PASS GO, OR TO COLLECT $200. IT WILL DELETE THE FOLDER STATED AND EVERYTHING BELOW IT.

      Code:
      rmdir /S /Q %Temp%
      md %Temp
      
      This will delete your Windows user Temp files (note the System uses another Temp directory).

      It will almost ALWAYS toss's a lot of errors about files being in use unable to delete, but will SMOKE all other old user Temp files. The reason I have the md %Temp% in there is just in case it IS able to delete this Critical folder it will be instantly recreated for Windows to keep using.

      Hope that helps some, end of command line 101 for today;-)

      Peace
       
    16. dirttrack

      dirttrack Member

      Joined:
      Dec 20, 2011
      Messages:
      33
      Likes Received:
      0
      Trophy Points:
      6
      Thanks for the help. The way it is setup in the last post does everything I want, but remove the directories. It does remove all the files in them and that works for me. I will google it more when I have the time.
       
    17. Mirabis

      Mirabis Community Developer

      Joined:
      Jun 14, 2010
      Messages:
      4,475
      Likes Received:
      86
      Trophy Points:
      48
      Do u happen to have a example of robocopy?
      I'd like some stuff like QB in Kicks svn, to be copied to the Bot's QB and stuff

      Kind Regards,

      Mirabis.

      Also says: "Access is denied." on all lines ;o
       
    18. lawlmatty

      lawlmatty New Member

      Joined:
      Feb 21, 2013
      Messages:
      18
      Likes Received:
      0
      Trophy Points:
      0
      Works great for me everytime which is helpful especially if you are like me and hate doing dailies.... lol

      I was wondering tho is there a way that you could include the command to clear the b.net cache to this as well? I think it would be easier to clean them all from one double click then to have to clear the B.net cache manually. I personally don't really know all that much about command prompts or anything like that or i would do it myself :( if its not possible just let me know :D

      +rep
       
    19. lawlmatty

      lawlmatty New Member

      Joined:
      Feb 21, 2013
      Messages:
      18
      Likes Received:
      0
      Trophy Points:
      0

      Did you try running it as an administrator?
       
    20. wearloga

      wearloga New Member

      Joined:
      Mar 16, 2012
      Messages:
      59
      Likes Received:
      0
      Trophy Points:
      0
      With HB down I finally took the time to once again try to get the SNV updating part of this script to work, but to no avail.
      I have just re-installed Tortoise SNV, with a reboot of my system after uninstalling the old copy and a reboot after installing the new copy.
      I still get the "snv is not recognised (...)" error, even though I have installed the command line tools.
      You wouldn't have any other ideas about how to get this to work, would you? I mean, it still is a superb script that saved me lots of time already, but getting this last bit to work would make it epic :)

      Cheers!
      Wearloga
       

    Share This Page