Thread: Copying an entire directory

  1. #1
    Registered User JustMax's Avatar
    Join Date
    Jan 2009
    Posts
    59

    Question Copying an entire directory

    I have a dialog control with two list controls. One contains a directory listing of a drive and the other has the listing of another drive. I am successful in using MoveFileEx() to move an entire directory but am unable to just copy the directory. I thought that CopyFileEx would help but it will only copy a file (or at least that is all I am able to get it to do).
    Is there a function that will copy a directory and all its contents without removing it from its source location?

    If so, could you please point me in the right direction?

    Thanks

  2. #2
    Registered User
    Join Date
    Nov 2008
    Location
    My computer
    Posts
    65
    You could copy all the files in a directory, then make a dir with the same name somewhere else and copy the files over.

  3. #3
    'Allo, 'Allo, Allo
    Join Date
    Apr 2008
    Posts
    639

  4. #4
    Registered User JustMax's Avatar
    Join Date
    Jan 2009
    Posts
    59
    Thanks adeyblue! Got it going.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. copying file from one user directory to another
    By Bargi in forum Linux Programming
    Replies: 6
    Last Post: 05-17-2009, 04:09 PM
  2. Copying all files in a directory
    By rak1986 in forum C Programming
    Replies: 2
    Last Post: 08-25-2008, 01:02 AM
  3. Couple errors please help :-D
    By JJJIrish05 in forum C Programming
    Replies: 9
    Last Post: 03-06-2008, 02:54 AM
  4. Copying a whole directory and its content
    By Enira in forum C Programming
    Replies: 4
    Last Post: 03-12-2006, 02:13 PM
  5. Copying an entire directory
    By Brian in forum Windows Programming
    Replies: 6
    Last Post: 07-20-2002, 11:35 AM