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 folders to another device

Copying folders to another device

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++
4 Posts 3 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.
  • S Offline
    S Offline
    Stefan Spenz
    wrote on last edited by
    #1

    Hi @all, maybe a simple question to most of you, but I never did this before while coding... What's the easiest and best way to copy all files inside a folder to a target device (e.g. drive D: )? And what classes or functions do you use? MFC stuff is welcome! :) Thx a lot! Stefan When I was young my mother told me to clean up my room, I told her -1!

    V _ 2 Replies Last reply
    0
    • S Stefan Spenz

      Hi @all, maybe a simple question to most of you, but I never did this before while coding... What's the easiest and best way to copy all files inside a folder to a target device (e.g. drive D: )? And what classes or functions do you use? MFC stuff is welcome! :) Thx a lot! Stefan When I was young my mother told me to clean up my room, I told her -1!

      V Offline
      V Offline
      valikac
      wrote on last edited by
      #2

      One solution is to loop through all files inside a directory via FindFirstFile() and FindNextFile() and then call MoveFile() and/or CopyFile(). Kuphryn

      1 Reply Last reply
      0
      • S Stefan Spenz

        Hi @all, maybe a simple question to most of you, but I never did this before while coding... What's the easiest and best way to copy all files inside a folder to a target device (e.g. drive D: )? And what classes or functions do you use? MFC stuff is welcome! :) Thx a lot! Stefan When I was young my mother told me to clean up my room, I told her -1!

        _ Offline
        _ Offline
        _Theo_
        wrote on last edited by
        #3

        Use the SHFileOperation function for easy copying.

        S 1 Reply Last reply
        0
        • _ _Theo_

          Use the SHFileOperation function for easy copying.

          S Offline
          S Offline
          Stefan Spenz
          wrote on last edited by
          #4

          _Theo_ wrote: Use the SHFileOperation function for easy copying Great. That's exactly I was looking for... Thanks! When I was young my mother told me to clean up my room, I told her -1!

          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