Gotcha (programming) - Gotchas in DOS Batch File Language

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:

    A curious thing about atrocity stories is that they mirror, instead of the events they purport to describe, the extent of the hatred of the people that tell them.
    Still, you can’t listen unmoved to tales of misery and murder.
    —John Dos Passos (1896–1970)

    Do you not know that a little yeast leavens the whole batch of dough?
    Bible: New Testament, 1 Corinthians 5:6.

    While waiting to get married, several forms of employment were acceptable. Teaching kindergarten was for those girls who stayed in school four years. The rest were secretaries, typists, file clerks, or receptionists in insurance firms or banks, preferably those owned or run by the family, but respectable enough if the boss was an upstanding Christian member of the community.
    Barbara Howar (b. 1934)

    An art whose medium is language will always show a high degree of critical creativeness, for speech is itself a critique of life: it names, it characterizes, it passes judgment, in that it creates.
    Thomas Mann (1875–1955)