Path: utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!swrinde!ucsd!ucbvax!agate!e260-3f!c60c-3fz From: c60c-3fz@e260-3f.berkeley.edu (In Sik Rhee) Newsgroups: comp.windows.ms Subject: Re: How may I automatically run a batch upon startup of DOS shell? Keywords: batch file non-windows application Message-ID: <1990Nov5.100924.27076@agate.berkeley.edu> Date: 5 Nov 90 10:09:24 GMT References: Sender: usenet@agate.berkeley.edu (USENET Administrator) Distribution: comp.windows.ms Organization: University of California, Berkeley Lines: 20 In article kerce@nu.cs.fsu.edu (Kingsley F. Kerce) writes: >I've had no success with automatically executing a batch file once a >command.com session is started in a window. NOTE THAT the batch file >will not run an application that I want to stick with--I just want to >stay at the command line processor after the batch runs. Ok, here's the way to do it (tricky, but works) you're gonna create 2 batch files... in the first one, lets call it dos.bat, you type in the name of the second batch file (Don't CALL it, just execute it). The second batch file is the one you will want to run... so for ex. DOS.BAT will have: @echo off go and GO.BAT will have what you want to do... it'll give you a prompt after go.bat is finished... I forget the exact reason why it does this, but it's gotta do something with having to "CALL" a batch file from within a batch file... anyway, it works, so why complain :)