1.

Solve : Please help with this bat file....?

Answer»

I am trying to right a batch file to REPLACE a custome game map. I would like to have the bat request 1 of 2 choices...the original file or the modded file. If I run this script:

copy c:\program_files\microsoft_games\halo\mods\deathisland_238_mod.map program_files\microsoft_games\halo\maps\deathisland.map

It works fine. BUt when I place it in the FOLLOWING bat file it does not:

@echo off
CLS
:LOOP
ECHO 1. Original Death Island Map
ECHO 2. 238 Modded Death Island Map
ECHO E. Exit
SET Choice=
SET /P Choice=Type the letter and press Enter:
IF '%Choice%'=='1' GOTO 1
IF '%Choice%'=='2' GOTO 2
IF /I '%Choice%'=='E' GOTO End
ECHO "%Choice%" is not valid. Please try again.
GOTO Loop
:1
copy c:\program_files\microsoft_games\halo\mods\deathisland_238_mod.map program_files\microsoft_games\halo\maps\deathisland.map
GOTO Again
:2
GOTO Again
:Again
PAUSE
CLS
GOTO Loop
:End
exit



Can anyone help figure out how to make this work?
Put quotes before and after the path of the files.

Al968HEY I THINK YOU DIDNT WRITE SUMAT GOOD,I MEAN MOD PLACE,..
Quote

HEY I THINK YOU DIDNT WRITE SUMAT GOOD,I MEAN MOD PLACE,..

WoW is that even English. :-?Quote
I am trying to right a batch file to replace a custome game map. I would like to have the bat request 1 of 2 choices...the original file or the modded file. If I run this script:

copy c:\program_files\microsoft_games\halo\mods\deathisland_238_mod.map program_files\microsoft_games\halo\maps\deathisland.map

It works fine. BUt when I place it in the following bat file it does not:

- - -

Can anyone help figure out how to make this work?


Is your os WinXP?

Does that computer have choice.com on it? in the path?
(because I'd do it a bit different, and it requires choice.com in the path)


You said, "BUt when I place it in the following bat file it does not: "
Describe exactly what happens.

selkov,

I think your problem is that the copy destination is relative path. You might want to make it ABSOLUTE like the source:

[edit]copy c:\program_files\microsoft_games\halo\mods\deathisland_238_mod.map [highlight]c:\[/highlight]program_files\microsoft_games\halo\maps\deathisland.map[/edit]

DOS IT HELP? Quote
HEY I THINK YOU DIDNT WRITE SUMAT GOOD,I MEAN MOD PLACE,..

Welcome back, wangming...


Discussion

No Comment Found