Link to home
Start Free TrialLog in
Avatar of nitin_kumars
nitin_kumars

asked on

Copying a File in turboc c++3.00

How to copy one file from one directory to another directory
through a program in turbo c++ 3.00 ?
Kindly reply fast as its very urgent.
Thanks.
ASKER CERTIFIED SOLUTION
Avatar of rbr
rbr

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nitin_kumars
nitin_kumars

ASKER

The System Command does not work on the system. It Gives An error saying -1. It Was very quick of you to reply. Kindly reply soon again but with an example. I'll wait for the reply till late night so please be fast b'cos its very very urgent.
Thanx

Is it for school or something?  Why do you need it so fast?

What operating system are you using?  DOS/Windows/Win95/98?  If it is any of those, the system command should work.  What is the value of the errno variable after you call system?

A return value of – 1 indicates an error, and errno is set to one of the following values:

E2BIG Argument list (which is system-dependent) is too big.

ENOENT Command interpreter cannot be found.

ENOEXEC Command-interpreter file has invalid format and is not executable.

ENOMEM Not enough memory is available to execute command; or available memory has been corrupted; or invalid block exists, indicating that process making call was not allocated properly.