I used to write batch files all the time, but it has been so long - Anyways, I put together a quick and dirty batch file, starting with a copy of the .bat file used to compile maps on Windows:
delete_maps.bat
@echo off
setlocal
rem setlocal ensures implicit endlocal call howevert batch exits.
rem so we can goto :EOF or ctrl-c an at point and env variables
rem and directory will be reset
pushd ..\..
echo This batch file will delete all compiled maps!
echo Press CTRL-C to abort, or
pause
echo Deleting all compiled maps...
@echo on
@del /q /f /s base\maps\*.bsp
@echo off
pause
Here is why I put this together, and what it is useful for:
I've found through updating a working SVN copy and re-compiling everything that sometimes ufo2map.exe is updated with fixes and therefore all the maps are then out-of-date and will not have the fixes unless they are all compiled. After running this new batch file, I can run the compile_maps.bat file but interrupt the map compiling if I need that machine to work on something else for a while, and then click on the compile_maps.bat file again so it will pick up where it left off.
By comparison, if I simply run compile_maps.bat with the "/clean" switch, it starts over with re-compiling the maps, meaning even if I had let it run for two hours first and it was almost done but I had to stop it to use the computer for something else, running compile_maps.bat again with the /clean switch would mean waiting another several hours instead of it simply finishing the last maps.
If this new batch file is run first, before committing to re-compiling all the maps, then compile_maps.bat can be run without any special switches, interrupted, and then pick up where it left off if run again.
This might sound complex at first, but in short it allows someone to re-compile all the maps in sections instead of all at once, so if someone updates ufo2map.exe with their SVN copy, they can start re-compiling while eating a meal, etc., but use the computer for something else afterward and continue re-compiling again the next time they step away from their machine.
This avoids having a computer tied-up for hours while re-compiling all the maps, if someone wants to use the machine for something else for a while, and break up the re-compiling into sections.
I admit this new file might not be the best solution for this scenario, but what do you guys think?
P.S. - I tested this, and yes, it works as it is coded presently. Use it with caution!