@echo off set "CURRENT_DIR=%~dp0" set "INIT=-console -steam -usercon -game left4dead2" set "DEBUG=-debug -condebug -gamestatsloggingtofile" start "" /HIGH .\srcds.exe %INIT% %DEBUG% -insecure -ip %IP% -port %PORT% +sv_lan 0 -maxplayers 32 +map %MAP% %MOD% :: There's an issue when using "-conclearlog" on windows :: in the srcds's console output will print the following message: :: Unable to remove <drive>:\path\to\left 4 dead 2 dedicated server\update\console.log! :: and a log file will be present in 'left4dead2\console.log' :: if we don't launch with "-conclearlog" the server will append it's output into "console.log" :: which is probably undesirable behavior, as it will eats up storage space overtime :: my work arround is :CLEARLOG function Goto CLEARLOG :CLEARLOG cd /D "%CURRENT_DIR%left4dead2" if exist "console.log" ( echo Clearing out console.log type nul > "console.log" )