AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   Batch file to make joining L4D2 custom campaign servers easier. (https://forums.alliedmods.net/showthread.php?t=334345)

Kr3m 09-17-2021 07:29

Batch file to make joining L4D2 custom campaign servers easier.
 
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")


Kr3m 09-17-2021 08:27

Re: Batch file to make joining L4D2 custom campaign servers easier.
 
Linux users can use this command from their addons directory:

Code:

ln -s ./workshop/* ./


All times are GMT -4. The time now is 05:49.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.