Close
Showing results 1 to 5 of 5
  1. #1
    Member BobGnarly's Avatar
    Join Date
    Nov 2007
    Location
    Somewhere out there.
    Posts
    555

    Default Windows XP .bat file to create symbolically linked copy of a wow directory

    I debated on putting this in Chorizotarian's Powershell thread on the same subject, but decide not to a) to not clutter that thread, and b) maybe make it easier for somebody searching.

    Basically, this is the .bat file script I use to do the same thing described there, namely, create a new wow directory (I call it wow2) that is a symbolically linked version of my primary wow directory (wow1 in this case). This has been discussed at length in other posts, but the basic reason to do this is increase performance while multiboxing, but still keep things like mods, keybindings, macros, etc in one place (this is where the linking comes in) so that updates are easier. The key difference is that it uses the native .bat file syntax.

    Here it is:

    Code:
    @echo off
    
    FOR /f %%I IN ('dir /b /a:-d wow1') DO (
    echo %%I
    fsutil hardlink create wow2\%%I wow1\%%I
    )
    
    junction wow2\Cache wow1\Cache
    junction wow2\Data wow1\Data
    junction wow2\EquipCompare wow1\EquipCompare
    junction wow2\Errors wow1\Errors
    junction wow2\Logs wow1\Logs
    junction wow2\Patches wow1\Patches
    junction wow2\Screenshots wow1\Screenshots
    
    mkdir wow2\Interface
    mkdir wow2\Interface\AddOns
    junction wow2\Interface\AddOns\MultiboxMaster wow1\Interface\AddOns\MultiboxMaster
    junction wow2\Interface\AddOns\Omen wow1\Interface\AddOns\Omen
    junction wow2\Interface\AddOns\Autobar wow1\Interface\AddOns\Autobar
    
    mkdir wow2\WTF                           
    junction wow2\WTF\Account wow1\WTF\Account
    To use this, you will need to download this utility and install it, which is basically what makes these "links".

    In the case of this code, the source directory is "wow1" and it will create a new "wow2". The script needs to be run in the parent directory of wow1, and I always delete the entire existing wow2 if it's present before I run (which isn't strictly necessary, but I'm just kinda OCD that way ).

    It will hardlink all the files in the wow1 directory, then "junction" the directories that I find useful. You can modify those directories as you see fit.

    Notice also that I junction in a few "Interface" directories (wow mods). In my particular setup, wow1 is always the main and wow2 is all the drones. I don't want to run all mods on my drones for performance reasons, which is why I didn't just junction the "Interface" directory itself. I left the mods in place just to show how to do it, but you'll probably want to delete those three lines and add similar ones to your tastes.

    Lastly, I do junction in the "WTF/account" directory so that I get per-account WTF .lua saved variables, which some mods will use. The reason I didn't just junction the WTF dir is so that I can have graphics settings and whatnot different (much lower) on the drones that I do on the main.

    Anyway, hope it helps somebody. Chorizotarian's script is probably better, but I thought I'd throw this up in case somebody doesn't have/want powerscript like me.
    No matter where you go, there you are.

  2. #2

    Default RE: Windows XP .bat file to create symbolically linked copy of a wow directory

    Looks good! I wholeheartedly endorse using cmd scripts for anyone who doesn't want PowerShell. I only wrote my verion that way because once I switched over I swore I'd never write another cmd script again :P

    If anyone wants to use BobGnarly's script on Vista I think that all you would have to do is:
    1) Replace "hardlink create" with "mklink"
    2) Replace all of the "junction ..." lines with "mklink /d ..."
    All my codes r belong to you: wow5box

  3. #3

    Default

    Nice script! There is also Winbolic Link if you prefer to not mess around with .bat files and are still running XP

    Thread is here: [Other] Winbolic Guide - Symlinking for XP

    We'll need to collaborate on all of these different methods and get them up on the wiki.

  4. #4
    Member BobGnarly's Avatar
    Join Date
    Nov 2007
    Location
    Somewhere out there.
    Posts
    555

    Default

    Hey guys,

    That's a good idea to get this up on the wiki. Maybe I'll try to get some part of it up this weekend unless one of you gets to it before I do. If I do, I'll make sections for the different approaches and you can edit them as you see fit.
    No matter where you go, there you are.

  5. #5

    Default Windows Vista .bat file to create symbolically linked copy of a wow directory

    Here is the batch file I used after spending many frustrating hours in the powershell thread. Note that I have a custom install directory and not the default one. Real easy to change quickly in notepad with find and replace.

    Code:
    ;Run this as an administrator
    
    md c:\!Games\wow1
    
    mklink /d c:\!Games\wow1\Data "c:\!Games\world of warcraft\Data"
    mklink /d c:\!Games\wow1\Cache "c:\!Games\world of warcraft\Cache"
    
    md c:\!Games\wow1\Errors
    
    mklink /d c:\!Games\wow1\Interface "c:\!Games\world of warcraft\Interface"
    
    md c:\!Games\wow1\Logs
    md c:\!Games\wow1\WTF
    
    mklink "c:\!Games\wow1\BackgroundDownloader.exe" "c:\!Games\world of warcraft\BackgroundDownloader.exe"
    mklink "c:\!Games\wow1\Burning Crusade Install Log.html" "c:\!Games\world of warcraft\Burning Crusade Install Log.html"
    mklink "c:\!Games\wow1\dbghelp.dll" "c:\!Games\world of warcraft\dbghelp.dll"
    mklink "c:\!Games\wow1\DivxDecoder.dll" "c:\!Games\world of warcraft\DivxDecoder.dll"
    mklink "c:\!Games\wow1\ijl15.dll" "c:\!Games\world of warcraft\ijl15.dll"
    
    copy "c:\!Games\world of warcraft\Launcher.exe" c:\!Games\wow1\Launcher.exe
    
    mklink "c:\!Games\wow1\Patch.html" "c:\!Games\world of warcraft\Patch.html"
    mklink "c:\!Games\wow1\Patch.txt" "c:\!Games\world of warcraft\Patch.txt"
    mklink "c:\!Games\wow1\realmlist.wtf" "c:\!Games\world of warcraft\realmlist.wtf"
    mklink "c:\!Games\wow1\Repair.exe" "c:\!Games\world of warcraft\Repair.exe"
    mklink "c:\!Games\wow1\Scan.dll" "c:\!Games\world of warcraft\Scan.dll"
    mklink "c:\!Games\wow1\unicows.dll" "c:\!Games\world of warcraft\unicows.dll"
    mklink "c:\!Games\wow1\World of Warcraft Install Log.html" "c:\!Games\world of warcraft\World of Warcraft Install Log.html"
    mklink "c:\!Games\wow1\Wow.exe" "c:\!Games\world of warcraft\Wow.exe"
    mklink "c:\!Games\wow1\WowError.exe" "c:\!Games\world of warcraft\WowError.exe"
    
    
    ;Syntax and definitions
    ;mklink [[/D] | [/H] | [/J]] link target
    ;/D – Creates a directory symbolic link. Default is a file symbolic link.
    ;/H – Creates a hard link instead of a symbolic link.
    ;/J – Creates a Directory Junction.
    ;link – Specifies the new symbolic link name.
    ;target – Specifies the path (relative or absolute) that the new link refers to.
    ;
    ;Just like ordinary files and folders, del and rmdir can be used to delete the 
    ;symbolic links to files and directories respectively.
    ;To delete symbolic link to a file, the following command line syntax can be used:
    ;del filename
    ;
    ;To delete symbolic link to a folder, the following command line syntax can be used:
    ;rmdir directoryname
    ;directoryname – Specifies the name of the folder/symbolic link to be deleted
    ;
    ;Supposedly (I have not tested this yet) in widows vista, windows explorer can be used to delete 
    ;the created directories safely when it is time to redo the links after an update
    At the moment I run all my characters in 2 person teams, so I run this twice, I just open notepad and do a find and replace of wow1 with wow2 to make the second copy. After that I copy the WTF folders from the 2 original accounts. I imagine that in the future I will need to backup the wtf folders after updating the main wow to a new location when I go to delete these wow1 and wow2 directories then copy them back. Have not went thru an update yet.

    Also, the clone copies (wow1 and wow2) are the 2 that I play from. since both are using the same addons folder, just have your slave toons unselect the addons you dont want them to run. I.E. wow1 runs alot more addons than wow2 does in my case since my main of each pair is on wow1.

    EDIT July 17, 2009
    If you have your accounts merged into a Battlenet account you need to add the following line:
    mklink "c:\!Games\wow1\Battle.net.dll" "c:\!Games\world of warcraft\Battle.net.dll"
    Windows Vista .bat file to create symbolically linked copy of a wow directory
    __________________________________________
    When nothing is certain, Everything is possible.
    __________________________________________

Similar Threads

  1. Replies: 92
    Last Post: 12-02-2010, 11:15 PM
  2. using ini file to create Whitelist
    By khabel in forum Software Tools
    Replies: 1
    Last Post: 10-18-2008, 11:27 AM
  3. Help on directory problems
    By Spirillen2001 in forum New Multi-Boxers & Support
    Replies: 7
    Last Post: 07-19-2008, 01:02 AM
  4. Can you create more function keys in windows?
    By Evilseed in forum General WoW Discussion
    Replies: 7
    Last Post: 03-24-2008, 03:37 AM
  5. One WoW directory or multiple
    By Blokus in forum General WoW Discussion
    Replies: 19
    Last Post: 12-11-2007, 10:36 AM

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •