Batch compiling question

Limpet

Newbie
Joined
Dec 27, 2004
Messages
877
Reaction score
0
This doesn't have too much to do with mapping but I'm curious anyway.

Ok, so I saw the tutorial over at Interlopers (a while back) on how to make a batchfile and compile the map outside of hammer to save some time. Now has anyone figured out how to get the newly created .bsp file and have it copied or moved to the proper maps folder?

I've been trying to get this for a couple nights now but I've had no success.

So far I have it where you can drag and drop the vmf onto the .bat it'll copy the .vmf to another folder for safe keeping, run vbsp/vvis/vrad and then end there (with a pause). What I'm looking for is how to get the name of the .vmf and store it into a variable so I can then do somthing like

Code:
set sdkmapsdir="%sourcesdk%\sourcesdk_content\hl2mp\mapsrc"
set hl2dmmapsdir="%sourcesdk%\half-life 2 deathmatch\hl2mp\maps"

copy %sdkmapsdir%\%examplefilename%.bsp %hl2dmmapsdir%

Whether or not thats written correctly I don't know. Again, to restate my question, does anyone know how to extract the filename without the extension of a file and store it into a variable?

I've found a couple ways but they're confusing and I don't understand them, if you want I can post them.

Thanks
 
Back
Top