I have a problem related to the speed of copying files in C++ on linux. I need to automate a process to copy files from one directory to another for media management. Anyway, the following code is what I have been using and it is not nearly fast enough. The entire focus of this application is speed. In fact in Windows, I am getting at least 5 times the speed from a VB app that I am using. I know I must be doing something wrong. I am compiling on a one processor machine and moving it to the test equipment which has four processors and 4 gigs or RAM. I wonder should I compile it there to see if it runs better or is there a better method for copying files from one directory to another. The file system is Reiserfs on a gentoo installation. The machine that I am compiling on is ext3 on Redhat.<br>
<br>
IPFile = fopen("/home/this.jpg","r");<br>
OPFile = fopen("/mediafiles/this.jpg","w");<br>
while ((c = fgetc(IPFile)) != EOF)<br>
{<br>
fputc(c, OPFile);<br>
}<br>
fclose(IPFile);<br>
fclose(OPFile);<br>
<br>
Anyway, I am at a loss. There has to be a better method than this. Thanks.<br>
<br>
---<br>
Larry Lines<br>