Skip to content

Instantly share code, notes, and snippets.

@tough-griff
Last active February 3, 2024 18:27
Show Gist options
  • Save tough-griff/ee63a453a01257525acc6628029ea04e to your computer and use it in GitHub Desktop.
Save tough-griff/ee63a453a01257525acc6628029ea04e to your computer and use it in GitHub Desktop.
WoW Autobackup

WoW Auto Addon Backup

Create a folder titled backup_script in your World of Warcraft\_retail_\ directory.

Within this folder, download and save the attached backup.bat (right click, save as) file. With a text editor like Notepad or Notepad++ open the backup.bat file and make the following changes:

  1. Change the backup_dir= line to the path where you'd like to save your backup. %userprofile% is short for your home directory, such as C:\Users\Bob. I recommend storing the backup in a cloud storage provider like Dropbox, Google Drive, OneDrive, etc.

Please note that this script does not automatically remove old backups, so be sure to clean up after yourself every once and a while or you will exhaust your storage space.

  1. Ensure that wow_dir= points to your World of Warcraft retail install location. This is likely C:\Program Files (x86)\World of Warcraft\_retail_\, but your path may differ.

If you don't have 7-Zip, download and install it. You will also need to download the 7-Zip Extra archive from https://www.7-zip.org/download.html. Extract this archive and copy the contents of the x64 folder to backup_script in World of Warcraft\_retail_\. If done correctly, the contents of your backup_script folder should look like this:

Folder contents

Now, to test your script works correctly you should be able to simply double click backup.bat and it should start to run! If working correctly, you should see the a screen like the following:

Running script

Automation

To automate this script, we'll be using Windows' Task Scheduler. From the start menu, search for the app and open it.

Step 1

Next, under Task Scheduler Library, right click and select New Folder.... Name the folder World of Warcraft.

Step 2

When World of Warcraft shows in the sidebar, right click it and select Create Task...

Step 3

In the popup that appears, fill the prompt out as follows:

Step 4.1

On the Triggers tab, click New... and configure when you'd like your backups to occur. I have mine set like so:

Step 4.2

Similarly, on the Actions tab, click New... and select Start a program. Under Program/script:, enter the path to the backup.bat file we created earlier. You can use the Browse... button to locate this, but it should be "C:\Program Files (x86)\World of Warcraft\_retail_\backup_script\backup.bat"

Step 4.3

IMPORTANT: YOU MUST ENSURE THAT YOU FILL IN THE Start in (optional): FIELD. This field must be filled in with the path to the backup_script folder that contains the backup script in the field above. If consistent with the line above this should be C:\Program Files (x86)\World of Warcraft\_retail_\backup_script\

Finally, the Settings tab should have the following settings applied:

Step 4.4

If you know what you're doing, you can adjust these settings to your liking, otherwise, leave them be.

The Conditions tab should have no options checked, and you can ignore the History tab.

Finally, to confirm the automated task runs as expected, you can right click the new task and select Run

Step 5

If correct, you should see a window just like you did when you ran the script the first time!

To confirm the script worked as expected, check the backup location you set in the script. You should see a series of folders (year, month, date of the backup) with a retail.7z folder in the last!

ECHO OFF
@TITLE WoW Addon Backup
set year=%date:~-4,4%
set month=%date:~-10,2%
set day=%date:~-7,2%
set backup_dir=%userprofile%\Dropbox\Backup\WoW
set wow_dir=C:\Program Files (x86)\World of Warcraft\_retail_
7za a "%backup_dir%\%year%\%month%\%day%\retail.7z" "%wow_dir%\WTF" "%wow_dir%\Interface"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment