Raised This Month: $12 Target: $400
 3% 

Request for a simple program


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tuan206
Member
Join Date: May 2016
Old 08-04-2016 , 18:40   Request for a simple program
Reply With Quote #1

Hi, I'm trying to get all the mapcycle for my workshop maps, I have about 100 and its gonna take forever to type them. I tried using the cmd way by downloading all the maps since mines hosted on gameserver, it didn't work. Can someone create a program where u place it in the directory of the workshop maps folder and it automatically generates mapcycle with all the ids and stuff
tuan206 is offline
tuan206
Member
Join Date: May 2016
Old 08-06-2016 , 14:36   Re: Request for a simple program
Reply With Quote #2

anyone?
tuan206 is offline
tuan206
Member
Join Date: May 2016
Old 08-06-2016 , 23:42   Re: Request for a simple program
Reply With Quote #3

I just decided to try this method, so I used a command and put it into notepad to make it a cmd, but when I placed it in the downloaded maps folder, it wouldn't generate the workshop maps, only like de_cache
here is the script
Quote:
@echo off
del maplist.txt
cd maps
For %%a in (*.bsp) do @echo %%~na >>"%~dp0maplist.txt"
echo List Generated!
pause
tuan206 is offline
Totenfluch
AlliedModders Donor
Join Date: Jan 2012
Location: Germany
Old 08-07-2016 , 12:19   Re: Request for a simple program
Reply With Quote #4

on Linux:

Code:
ls | grep .bsp > maplist.txt
You can use cygwin to use -some- linux commands on windows.
__________________
Notable Projects:
Event Item Spawner | Scissors, Rock, Paper for ZephStore
tVip | Smart Link Remover
PLG & GGC - CS:GO Roleplay

and countless more...

I can make a helicopter shoot missles if you want me to...

Last edited by Totenfluch; 08-07-2016 at 12:20.
Totenfluch is offline
tuan206
Member
Join Date: May 2016
Old 08-07-2016 , 16:55   Re: Request for a simple program
Reply With Quote #5

I use windows, and the problem is it only generates the bsp that's outside the map folder, it doesn't generate the bsp in the workshop folder, I want to the format to be something like
workshop/10101011001/kz_Ineedhelp
tuan206 is offline
Squallkins
AlliedModders Donor
Join Date: Mar 2005
Old 08-07-2016 , 20:53   Re: Request for a simple program
Reply With Quote #6

Try this:

Code:
del maplist.txt
for /f "tokens=1* delims=\" %%A in (
  'forfiles /s /m *.bsp /c "cmd /c echo @relpath"'
) do for %%F in (^"%%B) do echo %%~F >> maplist.txt
Squallkins is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 08-07-2016 , 21:27   Re: Request for a simple program
Reply With Quote #7

if you have shell access
https://forums.alliedmods.net/showpo...25&postcount=4
__________________
retired
shavit is offline
tuan206
Member
Join Date: May 2016
Old 08-07-2016 , 23:44   Re: Request for a simple program
Reply With Quote #8

Quote:
Originally Posted by .:{EK}:. SQUALL View Post
Try this:

Code:
del maplist.txt
for /f "tokens=1* delims=\" %%A in (
  'forfiles /s /m *.bsp /c "cmd /c echo @relpath"'
) do for %%F in (^"%%B) do echo %%~F >> maplist.txt
tried that, didn't generate any maplist.txt
tuan206 is offline
tuan206
Member
Join Date: May 2016
Old 08-07-2016 , 23:44   Re: Request for a simple program
Reply With Quote #9

Quote:
Originally Posted by shavit View Post
I use a gameserver so usually we don't have access to shell, only the staff
tuan206 is offline
Squallkins
AlliedModders Donor
Join Date: Mar 2005
Old 08-07-2016 , 23:52   Re: Request for a simple program
Reply With Quote #10

Quote:
Originally Posted by tuan206 View Post
tried that, didn't generate any maplist.txt
Depending on the number of maps you have, it can take a while. You need to place the batch file in the maps folder.

Also either create a maplist.txt (can be empty) before running the batch file

or remove the following line from the batch file if you do not have a maplist.txt

Code:
del maplist.txt
Squallkins is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:45.


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