Problems getting FileCopy to Work!

This is a discussion on Problems getting FileCopy to Work! within the C++ Programming forums, part of the General Programming Boards category; Hello! I have recently been trying to create a program that can copy certain files from an IM directory to ...

  1. #1
    Registered User
    Join Date
    Nov 2005
    Posts
    1

    Problems getting FileCopy to Work!

    Hello! I have recently been trying to create a program that can copy certain files from an IM directory to another directory (ideally a new one) I have been searching MSDN and while I have found an example for the File Copy function for win32, I am still stuck. Is it possible to copy C:\mydocs\list.xml to C:\newdir? Any help at all would be great! Thanks

    Steve

  2. #2
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    see MSDN I've used it on occasion using VC++ 6.0 and works ok for me.

  3. #3
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    Create the directory first, then copy the file.
    Code:
    if (CreateDirectory("c:\\newdir", NULL) == 0)
    {
       cout << "Unable to create directory." << endl;
       return 1;
    }
    //Now copy file

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problems with virtual function calls, please help
    By e66n06 in forum C++ Programming
    Replies: 12
    Last Post: 12-12-2007, 05:12 AM
  2. My monitor doesn't work with Ubuntu Linux.
    By indigo0086 in forum Tech Board
    Replies: 1
    Last Post: 07-12-2007, 11:59 AM
  3. C Pointers Problems
    By mhelal in forum C Programming
    Replies: 8
    Last Post: 01-10-2007, 06:35 AM
  4. LAN Problems!
    By sumo susi in forum Tech Board
    Replies: 2
    Last Post: 07-15-2004, 10:03 AM
  5. The Bludstayne Open Works License
    By frenchfry164 in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 11-26-2003, 11:05 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21