kroko Posted April 24, 2013 Share Posted April 24, 2013 hallo, i am trying to create a custom icon script. everytime a person click on it, it will delete maplist.txt and generate a new one with all the maps that is in the maps folder. what i have so far is: @echo off del maplist.txt cd maps For %%a in (*.bsp) do @echo %%~na >>"%~dp0maplist.txt" echo List Generated! pause if i have that then i need a bat file on each game server (in cstrike folder) for it to work. do anyone of you know a seloution that would work out of the box without having any script on the game server? i do not know much about batch scripting so if you say something advanced, then i would not understand! i got the current script from here http://forums.srcds.com/viewtopic/15871 Thanks in advance kroko Link to comment Share on other sites More sharing options...
CloudCUBE Posted April 24, 2013 Share Posted April 24, 2013 you won't need a batch script in each game folder, tcadmin will run the batch script from the monitor. Link to comment Share on other sites More sharing options...
kroko Posted April 24, 2013 Author Share Posted April 24, 2013 (edited) so i can just create a custom icon and use that as script? EDIT: I tryed using this @echo off cd cstrike del maplist.txt cd maps For %%a in (*.bsp) do @echo %%~na >>"%~dp0maplist.txt" echo List Generated! pause but that just deleted maplist.txt and diddent create it again. anyone know why? Edited April 24, 2013 by kroko Link to comment Share on other sites More sharing options...
CloudCUBE Posted April 25, 2013 Share Posted April 25, 2013 cd %ThisService_WorkingDirectory% del \q maplist.txt cd maps For %%a in (*.bsp) do @echo %%~na >>"%ThisService_WorkingDirectory%maplist.txt" that should work Link to comment Share on other sites More sharing options...
kroko Posted April 25, 2013 Author Share Posted April 25, 2013 (edited) cd %ThisService_WorkingDirectory% del \q maplist.txt cd maps For %%a in (*.bsp) do @echo %%~na >>"%ThisService_WorkingDirectory%maplist.txt" that should work i get this Could Not Find C:\q C:\TCAFiles\Users\kroko\12>cd C:\TCAFiles\Users\kroko\12\ Could Not Find C:\TCAFiles\Users\kroko\12\maplist.txt The system cannot find the path specified. C:\TCAFiles\Users\kroko\12>del \q maplist.txt C:\TCAFiles\Users\kroko\12>cd maps C:\TCAFiles\Users\kroko\12>For %a in (*.bsp) do @echo %~na 1>>"C:\TCAFiles\Users\kroko\12\maplist.txt" The script has executed successfully. You may close this window. maplist.txt is located in cstrike folder and not root i modifyed your script to this cd %ThisService_WorkingDirectory%cstrike del maplist.txt cd maps For %%a in (*.bsp) do @echo %%~na >>"%ThisService_WorkingDirectory%maplist.txt" that is creating the maplist.txt. but it is doing so in root. do you know how to get it to make it in the cstrike folder? Edited April 25, 2013 by kroko Link to comment Share on other sites More sharing options...
kroko Posted April 25, 2013 Author Share Posted April 25, 2013 nvm, got this to work cd %ThisService_WorkingDirectory%cstrike del maplist.txt cd maps For %%a in (*.bsp) do @echo %%~na >>"%ThisService_WorkingDirectory%cstrike\maplist.txt" Thanks alot for your help Link to comment Share on other sites More sharing options...
CloudCUBE Posted April 26, 2013 Share Posted April 26, 2013 I did it from my relative root. yours must of been different so adding cstrike\maplist.txt will fix it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now