Gotchas in DOS Batch File Language
One would expect that the batch file would execute commands exactly as if they were typed manually. This is not true in the particular case when one of the commands is determined to be another batch file, in which case it simply replaces the one currently being executed.
C:\test>copy con main.bat @echo off echo Starting main.bat subr echo Completing main.bat ^Z 1 file(s) copied. C:\test>copy con subr.bat @echo off echo Starting subr.bat echo Completing subr.bat ^Z 1 file(s) copied. C:\test>main.bat Starting main.bat Starting subr.bat Completing subr.bat C:\test>Read more about this topic: Gotcha (programming)
Famous quotes containing the words dos, batch, file and/or language:
“People dont choose their careers; they are engulfed by them.”
—John Dos Passos (18961970)
“Do you not know that a little yeast leavens the whole batch of dough?”
—Bible: New Testament, 1 Corinthians 5:6.
“I have been a soreheaded occupant of a file drawer labeled Science Fiction ... and I would like out, particularly since so many serious critics regularly mistake the drawer for a urinal.”
—Kurt Vonnegut, Jr. (b. 1922)
“There is ... in every child a painstaking teacher, so skilful that he obtains identical results in all children in all parts of the world. The only language men ever speak perfectly is the one they learn in babyhood, when no one can teach them anything!”
—Maria Montessori (18701952)