Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Copying files/directories

Copying files/directories

Scheduled Pinned Locked Moved C / C++ / MFC
question
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    esapp420
    wrote on last edited by
    #1

    I was wondering what the quickest method to copy a folder and all of its sub-directories and files to another location would be. I am currently using a recursive function to find all files in all subdirectories then manually making the directories and copying each file over to the new location. Is there a way to copy all of this at once (like in windows when its shows the files flying from one folder to another and it makes all subdirectories in the new location)??? Any suggestions would be appreciated! Thanks

    R 1 Reply Last reply
    0
    • E esapp420

      I was wondering what the quickest method to copy a folder and all of its sub-directories and files to another location would be. I am currently using a recursive function to find all files in all subdirectories then manually making the directories and copying each file over to the new location. Is there a way to copy all of this at once (like in windows when its shows the files flying from one folder to another and it makes all subdirectories in the new location)??? Any suggestions would be appreciated! Thanks

      R Offline
      R Offline
      Ramu Pulipati
      wrote on last edited by
      #2

      SHFileOperation() is the one you are looking for! It does have the progress window if you want to use. It does do copy recursive sub-directories. This does copy/rename/delete too...;) all in one package I dont think this is the fastest way but application level safest way as its a high level api. Thanks, Ramu

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups