Hey fellaz,
Here's an application to remove the "_tmpChunk.DAT" file from your Generals data map.
This file is generated when you use the Worldbuilder application and save your map.
I made it because the "_tmpChunck.DAT" file can cause scripts to execute
with errors, and i was a bit tired of removing them manually :P.
Check
Here and
Herefor more info about the "_tmpChunk.DAT" file.
When you startup Generals Worldbuilder a DOS window pops up with the message
that the Worldbuilder is running.
When you close Worldbuilder the application searches for the "_tmpChunk.DAT"
file and gives a message if it's deleted or not found.
When the message is shown the application closes after 3 seconds.
It's my first DOS application so if you see stuff that can be done better
please let me know.
If you have questions you know where to find me.
;--------------------------------------------------------------------------------------------------------
Here's the DOS program:Generals Code:
@ECHO OFF
MODE CON: COLS=48 LINES=5
TITLE WB "_tmpChunk.DAT" Remover (by acidbrain)
START "" "worldbuilder.exe"
COLOR 0C
ECHO.
ECHO Worldbuilder is running
ECHO.
:: This loop checks if Generals Worldbuilder is active.
:active
tasklist|>nul find /i "worldbuilder.exe"
IF ERRORLEVEL 1 (
GOTO check
) ELSE (
>nul ping -n 2 0.0.0.0
GOTO active
)
:: This loop checks if "_tmpChunk.DAT" exists, generates a message and closes the application after 3 seconds.
:check
IF EXIST "%USERPROFILE%\Documents\Command and Conquer Generals Data\_tmpChunk.DAT" (
DEL "%USERPROFILE%\Documents\Command and Conquer Generals Data\_tmpChunk.DAT"
CLS
COLOR 0C
ECHO.
ECHO _tmpChunk.DAT deleted
ECHO.
FOR /l %%a in (3,-1,1) do (TITLE %title% -- closing in %%as&ping -n 2 -w 1 127.0.0.1>NUL)
TITLE Press any key to close the application&ECHO.&GOTO:EOF
) ELSE (
CLS
COLOR 0C
ECHO.
ECHO _tmpChunk.DAT does not exist
ECHO.
FOR /l %%a in (3,-1,1) do (TITLE %title% -- closing in %%as&ping -n 2 -w 1 127.0.0.1>NUL)
TITLE Press any key to close the application&ECHO.&GOTO:EOF
)
Zero HourCode:
@ECHO OFF
MODE CON: COLS=50 LINES=5
TITLE ZH WB "_tmpChunk.DAT" Remover (by acidbrain)
START "" "worldBuilder.exe"
COLOR 0C
ECHO.
ECHO Worldbuilder is running
ECHO.
:: This loop checks if Generals Worldbuilder is active.
:active
tasklist|>nul find /i "worldbuilder.exe"
IF ERRORLEVEL 1 (
GOTO check
) ELSE (
>nul ping -n 2 0.0.0.0
GOTO active
)
:: This loop checks if "_tmpChunk.DAT" exists, generates a message and closes the application after 3 seconds.
:check
IF EXIST "%USERPROFILE%\Documents\Command and Conquer Generals Zero Hour Data\_tmpChunk.DAT" (
DEL "%USERPROFILE%\Documents\Command and Conquer Generals Zero Hour Data\_tmpChunk.DAT"
CLS
COLOR 0C
ECHO.
ECHO _tmpChunk.DAT deleted
ECHO.
FOR /l %%a in (3,-1,1) do (TITLE %title% -- closing in %%as&ping -n 2 -w 1 127.0.0.1>NUL)
TITLE Press any key to close the application&ECHO.&GOTO:EOF
) ELSE (
CLS
COLOR 0C
ECHO.
ECHO _tmpChunk.DAT does not exist
ECHO.
FOR /l %%a in (3,-1,1) do (TITLE %title% -- closing in %%as&ping -n 2 -w 1 127.0.0.1>NUL)
TITLE Press any key to close the application&ECHO.&GOTO:EOF
)
;-----------------------------------------------------------------------------------------------------------
Copy/paste the code into a text-file, save as a .bat-file and create a shortcut to the .bat file.
You can put the shortcut on your desktop and the batch file in your game directory.
If you don't want all those fancy windows to pop up use this code.
GeneralsCode:
START "" /WAIT "WorldBuilder.exe"
DEL "%USERPROFILE%\Documents\Command and Conquer Generals Data\_tmpChunk.DAT"
Generals Zero HourCode:
START "" /WAIT "WorldBuilder.exe"
DEL "%USERPROFILE%\Documents\Command and Conquer Generals Zero Hour Data\_tmpChunk.DAT"
Select the shortcut to the .bat file and go to properties than select "run minimized', this will hide the cmd screen.
.
Thanks to =Hawkeye= and Zeke from the
Mystique Game Studios Forum for their feedback.
Have fun... :D
Greetz, acidbrain
Edited by user Friday, February 17, 2012 10:50:43 PM(UTC)
| Reason: Not specified
acidbrain attached the following image(s):