However, if anyone is looking at how to batch the creation of symbolic- or hard- links, note that you need Administrative rights in your batch script. I found this block of code, pasted at the top of my file, to prompt for Admin rights before the code runs. Doing it manually from the context menu > 'Run as administrator' was giving the batch file problems, so this method was much more effective.
I also made an error in my last version that I posted here, on the code for the actual link generation:
Code: Select all
MKLINK "%dst%\!var2!%%~nxA" "%%A"
The last version was creating all the links in the working directory of the batch , this one will correctly place the symbolic link in the mirrored directory, also accounting for subdirectories.
Thank you thank you guys for the help! Hopefully this might help any other poor soul who decides to resort to a batch file to automate symlink creation!
P.S. If you want to create hard- and soft- links WITHOUT a batch, check this out.