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. How can I copy a folder from one location to another location through code

How can I copy a folder from one location to another location through code

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
6 Posts 6 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
    sujtha
    wrote on last edited by
    #1

    I am developing a application using vc++. I want to copy a folder with its entire contains from one location to another location through code. How can I achieve this using VC++ 6.0.

    R M H T 4 Replies Last reply
    0
    • S sujtha

      I am developing a application using vc++. I want to copy a folder with its entire contains from one location to another location through code. How can I achieve this using VC++ 6.0.

      R Offline
      R Offline
      Rajesh R Subramanian
      wrote on last edited by
      #2

      sujtha wrote:

      I am developing a application using vc++.

      MFC? Use the CopyFile function.

      Nobody can give you wiser advice than yourself. - Cicero

      D 1 Reply Last reply
      0
      • S sujtha

        I am developing a application using vc++. I want to copy a folder with its entire contains from one location to another location through code. How can I achieve this using VC++ 6.0.

        M Offline
        M Offline
        Mila025
        wrote on last edited by
        #3

        Hi, int SHFileOperation( LPSHFILEOPSTRUCT lpFileOp );

        ----------- Mila

        1 Reply Last reply
        0
        • S sujtha

          I am developing a application using vc++. I want to copy a folder with its entire contains from one location to another location through code. How can I achieve this using VC++ 6.0.

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          my suggestion is SHFileOperation:)


          WhiteSky


          1 Reply Last reply
          0
          • R Rajesh R Subramanian

            sujtha wrote:

            I am developing a application using vc++.

            MFC? Use the CopyFile function.

            Nobody can give you wiser advice than yourself. - Cicero

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            brahmma wrote:

            Use the CopyFile function.

            This operates on one file at a time, plus a call to CreateDirectory() would also need to be used.


            "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

            "Judge not by the eye but by the heart." - Native American Proverb

            1 Reply Last reply
            0
            • S sujtha

              I am developing a application using vc++. I want to copy a folder with its entire contains from one location to another location through code. How can I achieve this using VC++ 6.0.

              T Offline
              T Offline
              ThatsAlok
              wrote on last edited by
              #6

              sujtha wrote:

              I am developing a application using vc++. I want to copy a folder with its entire contains from one location to another location through code. How can I achieve this using VC++ 6.0.

              http://www.codeproject.com/shell/cshellfileop.asp[^]

              "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

              cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief And You

              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