Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!usc!merlin.usc.edu!aludra.usc.edu!danking From: danking@aludra.usc.edu (Dan King) Newsgroups: comp.sys.ibm.pc Subject: Executing .BAT files Message-ID: <4112@merlin.usc.edu> Date: 16 Jun 89 19:00:56 GMT Sender: news@merlin.usc.edu Reply-To: danking@aludra.usc.edu (Dan King) Distribution: na Organization: University of Southern California, Los Angeles, CA Lines: 18 (forgive me if this has been talked about before, but I can't seem to solve the problem) I'm writing a Turbo C program that needs to shell out to DOS in order to execute another file. This file will be either .EXE or .BAT, but I don't have any easy way of telling which (well, I have written a directory scanning routine that returns it, but that's beside the point). Everything works fine if I use .EXE files. My problem is that I can't seem to be able to use either the EXEC or SPAWN calls to execute a .BAT file. A perusal of the TC documentation reveals that the EXEC and SPAWN calls will automatically search for .EXE files, but don't seem to be able to deal with .BAT files at all. Is there any way to accomplish what I'm trying to accomplish? Thanks for any help, dank