home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!uwm.edu!rutgers!mcdhup!src4src!wozzle!alane
- From: alane@wozzle.linet.org (J. Alan Eldridge)
- Newsgroups: comp.lang.c
- Subject: Re: Help with spawnl() function
- Message-ID: <TskPXB3w165w@wozzle.linet.org>
- Date: 21 Jan 93 03:56:28 GMT
- References: <yT7JXB3w164w@jaflrn.UUCP>
- Organization: Disorganization
- Lines: 19
-
- jaf@jaflrn.UUCP (Jon Freivald) writes:
-
- > Why not use remove() or unlink()? You can't do "system("del file")
- > because del (& erase) are internal commands, although you could do
- > "system("command /c del file")" [a consideration here - what about folks
- > who don't use command.com? It's no-where on my machine, and which
- > command processor I'm using depends on what mood I'm in..!]
-
- char szCmdbuf[ 130 ];
- char *szComspec=getenv("COMSPEC");
-
- if (!szComspec)
- szComspec="COMMAND.COM";
- sprintf(szCmdbuf, "%s /C del file", szComspec);
- system(szCmdbuf);
-
-
- alane@wozzle.linet.org (J. Alan Eldridge)
- Fido: The University of Walamaloo 1:272/38.473
-