Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jul 2008
    Location
    Suffolk, United Kingdom
    Posts
    308
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Copying a directory (2000 / 2003)

    Hi,

    Does anyone know how to copy an entire directory including sub folders to a preset location.

    I was thinking about using a table to set the source directory and another table to set the subfolders I want to include from the source directory.

    I know how to move/copy files using VBA modules but not directories and there contents. It will need to overright exsiting copys in the destination or create the directory's if not already there.

    Can anyone give me some code I can adapt.

    Lets same for the example I will use c:Users as my source directory
    And inside the source I want to copy the directory and contents of kevin
    And the destination is c:backupuserskevin

    I can then adapt that for my more complex needs.

    Many thanks
    Regards
    Gerbil (AKA Kevin)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Copying a directory (2000 / 2003)

    You'll find lots of examples of working with folders, including copying them, in File and Folder Procedures - VBA.

  3. #3
    3 Star Lounger
    Join Date
    Jul 2008
    Location
    Suffolk, United Kingdom
    Posts
    308
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Copying a directory (2000 / 2003)

    Thanks Hans,

    That was very useful
    Regards
    Gerbil (AKA Kevin)

Posting Permissions

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