XP and batch files

Status
Not open for further replies.

Smash

Super Lurker
Retired Moderator
Joined
Oct 28, 2000
Messages
3,539
Location
Vancouver, Canada
I'm trying to run the .bat in Red Front but it won't stay.I give er a double click and I can see the black window with the season settings for like a 1/2 second.Then its gone.
Is there problem running such things made on earlier OS versions?..or do I just have a bad .bat?(d/led from CF and everything else is fine)
Seems the same with delete event also.
 
If the console appears so quickly it might mean there's some error. I don't know XP but normally with 2K you have an option that you need to disable. It's something like "automatically close window when finishing program". If you uncheck then the console will not disappear, hence leaving you time to read the message. But once again I don't know whether XP has such option, and if so, where it's hidden.
 
If you run the .bat file from the command prompt it won't close on you. Click Start --> Run --> type "cmd" (no quotes) --> the command prompt will appear. Now I'm assuming you know how to use DOS, so just go to the directory with the .bat file and run it. It will tell you if there is an error.

A file has probably been moved or something like that.
 
hehehe..I am still a pc baby.DOS is something you get from a cheap hooker ;)

I managed to find that but..do i have to enter the location manually?.All I Get is:
 

Attachments

  • cmd.jpg
    cmd.jpg
    11.2 KB · Views: 149
redfront.bat

c/program files/MicroProse Software/Civilization II Multiplayer Gold Edition/SCENARIO/Red Front
 
thanx..but that just makes it "go away".I think Ghenghis has the answer but I'll be damned if I can find where it is.Oh well.
 
no.I enter what you put and it dissappears.Poof.Without actually doing anything.
 
Well...I know why it's disappearing. It's written to disappear when it completes of finds an error.

I'll try and take out the commands that make it disappear without disrupting the file. Then I'll re-upload to you to try.

Well....I think this picture says it all:

"Choice" must be a DOS command that's not supported in WinXP. Or Batch Command.....Not sure what to tell you here....You can print a batch file and do the renaming of files manually?!? (Because that's all the .bat does) Or go to the author and try and make an XP compatible .bat.
 

Attachments

  • redfront.jpg
    redfront.jpg
    45.9 KB · Views: 146
choice sounds like another batch file. Is there a file named choice.XXX in the orignal directory that you had this batch file in?
I don't remember choice being a does command
 
Ok...lets pick this apart. This is the text from the .bat file:

@echo off
cls
echo.
echo RED FRONT Version 1.4
echo.
echo Loading graphic and event files for next phase of the game
echo Please choose from the options below:
echo.
echo 1. Load Summer 1941
echo 2. Load Winter 1941-42
echo 3. Load Summer 1942
echo 4. Load Winter 1942-43
echo 5. Load Summer 1943
echo 6. Load Winter 1943-44
echo 7. Load Summer 1944
echo 8. Load Winter 1944-45
echo 9. Load Summer 1945
echo X. Exit without Loading
echo.
choice /c:123456789X Enter your selection

if errorlevel 10 goto done
if errorlevel 9 goto s1945
if errorlevel 8 goto w1944
if errorlevel 7 goto s1944
if errorlevel 6 goto w1943
if errorlevel 5 goto s1943
if errorlevel 4 goto w1942
if errorlevel 3 goto s1942
if errorlevel 2 goto w1941
if errorlevel 1 goto s1941

:s1941
echo.
echo Summer 1941
copy sterrain1.gif terrain1.gif
copy sterrain2.gif terrain2.gif
copy scities.gif cities.gif
copy rules1.txt rules.txt
copy units1.gif units.gif
copy events1.txt events.txt
copy sound\Karl.wav sound\Extra1.wav
DELEVENT RF.sav
goto done

:w1941
echo.
echo Winter 1941-42
@echo off
copy wterrain1.gif terrain1.gif
copy wterrain2.gif terrain2.gif
copy wcities.gif cities.gif
copy rules2.txt rules.txt
copy units2.gif units.gif
copy events2.txt events.txt
copy sound\Karl.wav sound\Extra1.wav
DELEVENT RF.sav
goto done

:s1942
echo.
echo Summer 1942
@echo off
copy sterrain1.gif terrain1.gif
copy sterrain2.gif terrain2.gif
copy scities.gif cities.gif
copy rules3.txt rules.txt
copy units3.gif units.gif
copy events3.txt events.txt
copy sound\Karl.wav sound\Extra1.wav
DELEVENT RF.sav
goto done

:w1942
echo.
echo Winter 1942-43
@echo off
copy wterrain1.gif terrain1.gif
copy wterrain2.gif terrain2.gif
copy wcities.gif cities.gif
copy rules4.txt rules.txt
copy units4.gif units.gif
copy events4.txt events.txt
copy sound\Karl.wav sound\Extra1.wav
DELEVENT RF.sav
goto done

:s1943
echo.
echo Summer 1943
@echo off
copy sterrain1.gif terrain1.gif
copy sterrain2.gif terrain2.gif
copy scities.gif cities.gif
copy rules5.txt rules.txt
copy units5.gif units.gif
copy events5.txt events.txt
copy sound\Karl.wav sound\Extra1.wav
DELEVENT RF.sav
goto done

:w1943
echo.
echo Winter 1943-44
@echo off
copy wterrain1.gif terrain1.gif
copy wterrain2.gif terrain2.gif
copy wcities.gif cities.gif
copy rules6.txt rules.txt
copy units6.gif units.gif
copy events6.txt events.txt
copy sound\Karl.wav sound\Extra1.wav
DELEVENT RF.sav
goto done

:s1944
echo.
echo Summer 1944
@echo off
copy sterrain1.gif terrain1.gif
copy sterrain2.gif terrain2.gif
copy scities.gif cities.gif
copy rules7.txt rules.txt
copy units7.gif units.gif
copy events7.txt events.txt
copy sound\missile.wav sound\Extra1.wav
DELEVENT RF.sav
goto done

:w1944
echo.
echo Winter 1944-45
@echo off
copy wterrain1.gif terrain1.gif
copy wterrain2.gif terrain2.gif
copy wcities.gif cities.gif
copy rules8.txt rules.txt
copy units8.gif units.gif
copy events8.txt events.txt
copy sound\missile.wav sound\Extra1.wav
DELEVENT RF.sav
goto done

:s1945
echo.
echo Summer 1945
@echo off
copy sterrain1.gif terrain1.gif
copy sterrain2.gif terrain2.gif
copy scities.gif cities.gif
copy rules9.txt rules.txt
copy units9.gif units.gif
copy events9.txt events.txt
copy sound\missile.wav sound\Extra1.wav
DELEVENT RF.sav
goto done

:done
echo.


I've also attached the .bat file. You know Smash. I can write a quick VB program that could probably do this stuff for you....but I'd rather try and fix this first.

Now...as you can see...I doubt that choice is another file. If definitally think it's a batch command. Question is...what does it do? Why doesn't it work in XP? And how do we fix it?
 
hmmm..well what it does,or supposed to do,is load the different rules,units,terrains,events etc for each part of the scenario.
It all can be done manually,but the .bat makes that process a simple matter of a double click.

There was nothing else for the .bat.I've seen it before and it looks fine.Something in XP is funny.

Maybe I should report it to MS?

I kinda have a feeling Captain Nemo isn't too interested in making an XP compatible .bat these days :(
 
cohice peoples is a dos command on windows95 you can find the programme for it in the c:\windows\command\ dirrectoryor in the c:\dos\ dirrectory on 3.11 I m not sure about the other versions though I m not sure what i does but I can find out if you really want to know

any way I have attached it ziped up

t92300:D :goodjob:
 
cool! I had no idea about the choice.com command. Also, a little bit of information. You need the choice.com file in the same directory with the redfront.bat file. I got it to work in XP when they were in the same directory and it doesn't need to be the %system%\command directory.
 
Eureka!!!..it works.

many thanks.
:D
 
Status
Not open for further replies.
Top Bottom