TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: KRIS O`SHEA
from: CRAIG A MCKAY
date: 1997-04-22 19:02:00
subject: DOS commands

Y'ello Kris!
14 Apr 97, All listened thoughtly to Kris O'shea...
 KO> Does anyone know how you can use DOS commands such as "COPY" and
 KO> "RENAME" etc. in C/C++ programs.
 KO> I remember doing it once before, using a special keyword but I've
 KO> lost the source code for it. It's something like:
 KO>          ""
I hope I'm right in saying you need to use a system() func call.  But, 
ecause
COPY and RENAME are both part of COMMAND.COM, you will need:
           system("command /c copy file1 file2") ;
Sort of style.  That what you wanted?  I'm not sure about Borland, but you'll
probably have to include stdlib.h.
                            Fido = 2:259/33
  --Craigzilla++        Internet = McMoose@sol.co.uk
                             WWW = http://www.taynet.co.uk/users/mcmoose/
--- GEcho 1.00
---------------
* Origin: The Kilted Bun, Letham Angus -- hame o' the McMoose (2:259/33)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.