Writing a Batch File

Brian07

Senior member
Oct 13, 1999
847
0
76
I need to write a simple batch file. The .bat will be ran on NT 4 boxes. All I need to do is give the user a menu to choose 1 of 2 options. The first option is to copy a given list of files and create several directories, and the second option would be to reverify that the files were succesfully copied. I know how to copy, fc, compare, etc... but the current script I have just flashes up and down in a dos box when its ran. It looks as if it just skips my menu. Which looks like

:BEGIN
@ECHO OFF
verify on

/C:123 /t:D,10 Choose - (1) To create directories and copy files (2) To verify Files were written AFTER being copied

IF ERRORLEVEL=2 GOTO TWO
IF ERRORLEVEL=1 GOTO ONE
GOTO END

:eek:NE
copy etc.
GOTO END

:TWO
fc etc.

:END


ANy ideas on where I"m wrong?
 

squirtle24

Senior member
Apr 17, 2001
253
0
0
Just a guess, here: I don't think that "choice" is a standard part of WinNT's command set(though it's supposedly in the resource kit), so check to see if you are getting an error on that line.
 

Brian07

Senior member
Oct 13, 1999
847
0
76
Hmmm.....not a typo. It may be the problem though, when it runs it just kicks flashes the pop up window real fast. Its falling through the choice section and running all commands.
 

whalen

Golden Member
Dec 5, 2000
1,176
0
0
you can put "pause" at the end so it will "pause", and you can see what went wrong...hehe
 

Need4Speed

Diamond Member
Dec 27, 1999
5,383
0
0
or run the batch from a cmd windows rather than having it open the window...that way the window wont close and u can scroll up to see what happened