(1 Kb)
Updated: 10-01-13 08:25 PM
Updated:10-01-13 08:25 PM
Created:10-01-13 08:25 PM

Post Raid Cleanup Batch File

Version: 1.0
by: Tondef [More]

A simple batch file to move and rename the combat log after a raid run to simplify uploading different types of raids to World of Logs.

You will have log out of WoW to run the batch file.

What I use it for.
I run LFR, Flex, and a 10 man each week. I like to upload my logs to World of Logs, but having all of them mixed together was getting painful. This batch file will allow you to save your log files for "PUG" (LFR), Flex, and your raid team with different names. You could modify it for as many teams as you want. I also find that WoW works better when I clean out the combat log and chat log files on a normal schedule.

Full text of the file below, just cut and paste into your favorite text editor and save as a batch file.
You will need to edit the lines for your directory locations and what you want to call the raid teams. The code is commented to help you find the sections to change. Optionally, you can download the attached text file, and rename it to bat and use that.

@Echo OFF
REM Change the following to your specific file locations
REM WoW install directory
SET WoW=C:\World of Warcraft

REM These directories are where you want to save the output files to Drive Letter\directory
SET EventLog=G:\WoWLogs\
SET CombatLog=G:\WoWLogs\CombatLogs\
SET ChatLog=G:\WoWLogs\ChatLogs\
SET ScreenShot=G:\WoWLogs\Screenshots\

REM Adjust this line to the language used in your WoW install
SET Language=enUS

REM Set this line to the name of your raid team
SET Team=YourRaidTeamNameHere
SET Flex=FlexTeamNameHere

REM You should be able to leave the rest of the code alone.
REM ------------------------------------------------------------------------
REM ------------------------------------------------------------------------
REM Setting DTG and counters
SET Today=%Date: =0%
SET Year=%Today:~-4%
SET Month=%Today:~-10,2%
SET Day=%Today:~-7,2%
SET ChangeCount=0
SET AppendCount=0

ECHO Welcome %USERNAME%. Today is %DATE%.  
ECHO The WoW Directory is %WoW%
ECHO The Combat Log Directory is %CombatLog% 
ECHO The Chat Log Directory is %ChatLog%.
ECHO Screenshots will be moved to %ScreenShot%
ECHO Your WoW client is using %Language%
ECHO If a Creature Cache exists it will be deleted
ECHO to allow NPC Scan to work correctly.
Echo How would you like to name your Combat Log?
Echo 1. "PUG" 
Echo 2. "%Team%" Raid Team Log 
Echo 3. "%Flex%" Raid Team Log
set LogName=PUG
set /p choice="Enter your Choice: "
if "%choice%"=="1" set LogName=PUG
if "%choice%"=="2" set LogName=%Team%
if "%choice%"=="3" set LogName=%Flex%
echo Your combat log will be saved to:
Echo %CombatLog%%Year%_%Month%_%Day%_%LogName%_WoWcombatlog.txt
CD /D %WoW% 

REM Clear the Creature Cache for NPC Scan
IF EXIST ".\Cache\WDB\%Language%\creaturecache.wdb" (
   DEL /S /Q ".\Cache\WDB\%Language%\creaturecache.wdb"
   ECHO Creature Cache Deleted.
   ) ELSE ECHO No Creature Cache Found.
REM CombatLog Rename and Move/Append 
IF EXIST ".\Logs\WoWcombatlog.txt" (
   RENAME ".\Logs\WoWcombatlog.txt" %Year%_%Month%_%Day%_%LogName%_WoWCombatLog.txt
   SET /a ChangeCount=%ChangeCount%+1
   IF EXIST %CombatLog%"%Year%_%Month%_%Day%_%LogName%_WoWcombatlog.txt" (
      GOTO CombatAppend
      ) ELSE (
      MOVE .\Logs\%Year%_%Month%_%Day%_%LogName%_WoWCombatLog.txt %CombatLog%\%Year%_%Month%_%Day%_%LogName%_WoWcombatlog.txt))

REM ChatLog Rename and Move/Append
IF EXIST ".\Logs\WoWchatlog.txt" (
   RENAME ".\Logs\WoWchatlog.txt" %Year%_%Month%_%Day%_%LogName%_WoWChatLog.txt
   SET /a ChangeCount=%ChangeCount%+1
   IF EXIST %ChatLog%"%Year%_%Month%_%Day%_%LogName%_WoWchatlog.txt" (
      GOTO ChatAppend
      ) ELSE (
      MOVE .\Logs\%Year%_%Month%_%Day%_%LogName%_WoWchatlog.txt %ChatLog%\%Year%_%Month%_%Day%_%LogName%_WoWchatlog.txt))

REM Screenshot cleanup
IF EXIST .\Screenshots\*.jpg Move .\Screenshots\*.jpg %ScreenShot%

REM Final output
ECHO %DATE%:%ChangeCount% Log Files moved to Log Archives. >> %EventLog%EventLog.txt
ECHO %DATE%:%AppendCount% Logs were appended to existing log files. >> %EventLog%EventLog.txt
ECHO %ChangeCount% Log Files moved to Log Archives.
ECHO %AppendCount% Logs were appended to existing log files.
ECHO --------------------------------------------
ECHO Program complete.  Exit after next keypress.
ECHO --------------------------------------------

REM Functions used above
ECHO. >> %CombatLog%%Year%_%Month%_%Day%_%LogName%_WoWcombatlog.txt
TYPE .\Logs\%Year%_%Month%_%Day%_%LogName%_WoWcombatlog.txt >> %CombatLog%\%Year%_%Month%_%Day%_%LogName%_WoWcombatlog.txt
DEL .\Logs\%Year%_%Month%_%Day%_%LogName%_WoWcombatlog.txt
SET /a %AppendCount%+=1

ECHO. >> %ChatLog%%Year%_%Month%_%Day%_%LogName%_WoWchatlog.txt
TYPE .\Logs\%Year%_%Month%_%Day%_%LogName%_WoWchatlog.txt >> %ChatLog%\%Year%_%Month%_%Day%_%LogName%_WoWchatlog.txt
DEL .\Logs\%Year%_%Month%_%Day%_%LogName%_WoWchatlog.txt
SET /a %AppendCount%+=1

Optional Files (0)

There have been no comments posted to this file.
Be the first to add one.

Category Jump: