Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command to copy a file 1

Status
Not open for further replies.

ascht

Programmer
Sep 22, 2000
43
0
0
CH
What's the command for copying files?
I want to backup a file by the copy command before i write the new one.

Andrew
 
<1> you want to copy your source files for backup
A--> press the given comination of keys [Alt] + [F] + [A]
[Alt] for Alter, [F] for File &amp; [A] for Save as
and then give a new name for file.

======= OR========

<2> you want to save a backup file with the help of operating systems
[you did'nt mention the operating system, please mention it.]
 
I think he means that he wants to copy a file that his program is about to write to.

For example if I want to copy a .BMP image before I read it and change it to Greyscale.... How would you do that?

AKA C:\Temp\Hello.bmp --> C:\Temp\Hello_bk.bmp

Can I do this without reading and then writing the file again in Visual C Studio 6
 

One way I found is by a system call to the shell:
spawn(...)
or
system( &quot;copy mypic.bmp mypic.bak&quot; );

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top