CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Threaded View

  1. #1
    Join Date
    Jul 2008
    Posts
    8

    The CopyFile Function Error 3

    I seem to get an CopyFile error 3 with this code. FS means File Size (it checks file size)
    fname2 and 3 are both strings.
    Code:
    	fname2 = path + "\\" + data.cFileName;
    	fname3 = "L" + fname2.erase(0,1); 
    	fname2 = "C" + fname2;
    	if (FileExists(fname3) == false){
                    CopyFile(fname2.c_str(),fname3.c_str(),0);
                    }
    	else {
    		if (FS(fname3) < FS(fname2)) {
                            CopyFile(fname2.c_str(),fname3.c_str(),0);
                            }
                    }
    Last edited by cabledevin; July 11th, 2010 at 09:04 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured