View Single Post
Author Message
Kr3m
Junior Member
Join Date: Aug 2021
Old 09-17-2021 , 07:29   Batch file to make joining L4D2 custom campaign servers easier.
Reply With Quote #1

So I noticed a lot of times if I wanted to connect to one of my servers running a custom campaign, if I typed connect ip:port in the console before the addons were finished loading, the server would not connect and I'd have to enter the command again. I also noticed this when trying to load steam links to connect to games directly from my website. I looked into it, and while one solution would be to copy all files from your addons/workshop folder directly to your addons folder, this would waste quite a bit of disk space. A better solution would be to create a batch file that can create symlinks to the workshop folder. If you copy this text and place it in a file called addons.bat and then put that file in your addons directory, you can run it from a command prompt as administrator, and it will create the necessary symlinks for you.

Code:
@ECHO OFF
for /f "delims==" %%k in ('dir ".\workshop\*" /s /b') do (mklink ".\%%~nxk" "%%~k")

Last edited by Kr3m; 09-17-2021 at 10:42.
Kr3m is offline