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)
|