Sorry for digging this post up but i have a question similar to this.
Here's what i use
@echo off
echo.
REM Variable block below. Change to match your settings if you get an error.
set wowdir="D:\World of Warcraft\
set wow_process64="Wow-64.exe"
set wow_process32="Wow.exe"
set launcher_file=%wowdir%World of Warcraft Launcher.exe"
set creature_file=%wowdir%Cache\WDB\enUS\creaturecache.wdb"
set error_files=%wowdir%Errors\*"
set archive_files=%wowdir%Logs\archive\*"
set wow_mfil=%wowdir%WoW.mfil"
set wow_pfil=%wowdir%WoW.pfil"
set wow_tfil=%wowdir%WoW.tfil"
REM End variable block. You should not need to change anything below this line.
tasklist /FI "IMAGENAME eq %wow_process64%" 2>NUL | find /I /N %wow_process64%>NUL
if "%ERRORLEVEL%"=="0" goto processrunning64
goto Check32
:Check32
tasklist /FI "IMAGENAME eq %wow_process32%" 2>NUL | find /I /N %wow_process32%>NUL
if "%ERRORLEVEL%"=="0" goto processrunning32
goto misc
:processrunning64
echo Skipping files cleanup, %wow_process64% is already running.
goto wowstart
:processrunning32
echo Skipping files cleanup, %wow_process32% is already running.
goto wowstart
:misc
if exist %error_files% del /q %error_files%
if exist %archive_files% del /q %archive_files%
goto creaturecheck
:creaturecheck
if exist %creature_file% goto clearcreature
goto notfoundcreature
:notfoundcreature
echo Skipped %creature_file%
echo.
goto mfilcheck
:clearcreature
del /q %creature_file%
echo Deleted %creature_file%
echo.
goto mfilcheck
:mfilcheck
if exist %wow_mfil% goto clearmfil
goto notfoundmfil
:notfoundmfil
echo Skipped %wow_mfil%
echo.
goto pfilcheck
:clearmfil
del /q %wow_mfil%
echo Deleted %wow_mfil%
echo.
goto pfilcheck
:pfilcheck
if exist %wow_pfil% goto clearpfil
goto notfoundpfil
:notfoundpfil
echo Skipped %wow_pfil%
echo.
goto tfilcheck
:clearpfil
del /q %wow_pfil%
echo Deleted %wow_pfil%
echo.
goto tfilcheck
:tfilcheck
if exist %wow_tfil% goto cleartfil
goto notfoundtfil
:notfoundtfil
echo Skipped %wow_tfil%
goto startwow
:cleartfil
del /q %wow_tfil%
echo Deleted %wow_tfil%
goto startwow
:startwow
if exist %launcher_file% goto wowstart
echo.
echo --------------------
echo Launcher NOT found at %launcher_file%. Check your path.
echo --------------------
pause
goto end
:wowstart
echo.
echo --------------------
echo Starting Launcher
echo --------------------
echo.
echo Enjoy!
echo.
%launcher_file%
@echo off
echo This window will remain open for 5 seconds.
PING -n 6 127.0.0.1>nul
:end
exit
Now, what do i have to do so that it deletes creaturecache in every language because i have enUS but also frFR
There is no longer any reason to delete the creature cache, as it is no longer possible (since patch 6.0.2) for addons to detect rare spawns (or anything else) by scanning the cache.
There is no longer any reason to delete the creature cache, as it is no longer possible (since patch 6.0.2) for addons to detect rare spawns (or anything else) by scanning the cache.
Sure ok, but still, this might be usefull for something else later.
So, yeah, is it possible to replace \enUS\ by some kind of wildcard ?
Okay, moved your post to its own thread with a more descriptive title, so people know what you're actually asking about instead of ignoring the thread because it's no longer relevant.
Sure ok, but still, this might be usefull for something else later.
So, yeah, is it possible to replace \enUS\ by some kind of wildcard ?
If you're going to be doing That Kind Of Thing, just delete the cache subdir entirely. Honestly, the time spent figuring out details and typing/pasting in the line for each particular cached file is more than the time it takes to rebuild the entire cache tree.
If you absolutely must snipe individual files while leaving the rest of the cache tree alone, try replacing the locale name with "*", I honestly don't know if CMD.EXE's "IF EXIST" conditional works on wildcards at all. Maybe prepend an 'echo' in front of the action command so you can see what it would have done before trying it for realsies.
If you still need it done and CMD.EXE can't do it, then I'd advise either learning PowerShell (and God have mercy on your brain), or installing a copy of Cygwin and just scripting in whatever language you prefer using (Bourne variant, Perl, Ruby, Lua, etc).
Good call on looking for running processes first. Most people wouldn't think of that.
Here's what i use
Now, what do i have to do so that it deletes creaturecache in every language because i have enUS but also frFR
Sure ok, but still, this might be usefull for something else later.
So, yeah, is it possible to replace \enUS\ by some kind of wildcard ?
If you're going to be doing That Kind Of Thing, just delete the cache subdir entirely. Honestly, the time spent figuring out details and typing/pasting in the line for each particular cached file is more than the time it takes to rebuild the entire cache tree.
If you absolutely must snipe individual files while leaving the rest of the cache tree alone, try replacing the locale name with "*", I honestly don't know if CMD.EXE's "IF EXIST" conditional works on wildcards at all. Maybe prepend an 'echo' in front of the action command so you can see what it would have done before trying it for realsies.
If you still need it done and CMD.EXE can't do it, then I'd advise either learning PowerShell (and God have mercy on your brain), or installing a copy of Cygwin and just scripting in whatever language you prefer using (Bourne variant, Perl, Ruby, Lua, etc).
Good call on looking for running processes first. Most people wouldn't think of that.
I accomplished this with the code I posted here.