Copying an entire directory

This is a discussion on Copying an entire directory within the C Programming forums, part of the General Programming Boards category; I have a dialog control with two list controls. One contains a directory listing of a drive and the other ...

  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
    Sly
    Sly is offline
    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
    611

  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, 01:54 AM
  4. Copying a whole directory and its content
    By Enira in forum C Programming
    Replies: 4
    Last Post: 03-12-2006, 01:13 PM
  5. Copying an entire directory
    By Brian in forum Windows Programming
    Replies: 6
    Last Post: 07-20-2002, 11:35 AM

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