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. Visual Basic
  4. want to move the folder from one drive to another

want to move the folder from one drive to another

Scheduled Pinned Locked Moved Visual Basic
7 Posts 5 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.
  • R Offline
    R Offline
    Rizwan Bashir
    wrote on last edited by
    #1

    Hye guys I have one folder contining N numbers of child folders and all the folders also have N Number of child folders and then files. So in total it is a mess. I want to move the folder from one drive to another which is not supported. I have to copy and paste the complete structure. Do any one have a generic code for this. Though I can write the code but I am very lazy this week. if any one have please send it over.

    D M 2 Replies Last reply
    0
    • R Rizwan Bashir

      Hye guys I have one folder contining N numbers of child folders and all the folders also have N Number of child folders and then files. So in total it is a mess. I want to move the folder from one drive to another which is not supported. I have to copy and paste the complete structure. Do any one have a generic code for this. Though I can write the code but I am very lazy this week. if any one have please send it over.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Rizwan bashir wrote: move the folder from one drive to another which is not supported Moving files from one volume to another is not supported. You have to copy the file structure over, then go back and delete the originals. Rizwan bashir wrote: Though I can write the code but I am very lazy this week. if any one have please send it over. Not our fault! Why should I send you code for free that cost me money to write? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      R 1 Reply Last reply
      0
      • D Dave Kreskowiak

        Rizwan bashir wrote: move the folder from one drive to another which is not supported Moving files from one volume to another is not supported. You have to copy the file structure over, then go back and delete the originals. Rizwan bashir wrote: Though I can write the code but I am very lazy this week. if any one have please send it over. Not our fault! Why should I send you code for free that cost me money to write? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        R Offline
        R Offline
        Rizwan Bashir
        wrote on last edited by
        #3

        Dave Kreskowiak wrote: Why should I send you code for free that cost me money to write? ok tell me how much you charge for this type of code ?

        A 1 Reply Last reply
        0
        • R Rizwan Bashir

          Dave Kreskowiak wrote: Why should I send you code for free that cost me money to write? ok tell me how much you charge for this type of code ?

          A Offline
          A Offline
          Anonymous
          wrote on last edited by
          #4

          You're joking right? This is not what CP is about guy. We will help you with YOUR code, not sell you ours.

          1 Reply Last reply
          0
          • R Rizwan Bashir

            Hye guys I have one folder contining N numbers of child folders and all the folders also have N Number of child folders and then files. So in total it is a mess. I want to move the folder from one drive to another which is not supported. I have to copy and paste the complete structure. Do any one have a generic code for this. Though I can write the code but I am very lazy this week. if any one have please send it over.

            M Offline
            M Offline
            Mandar Patankar
            wrote on last edited by
            #5

            Try using this Directory.Move("SourceDirName", "destDirName") I think this should solve your problem. Mandar Patankar Microsoft Certified professional

            R 1 Reply Last reply
            0
            • M Mandar Patankar

              Try using this Directory.Move("SourceDirName", "destDirName") I think this should solve your problem. Mandar Patankar Microsoft Certified professional

              R Offline
              R Offline
              Rizwan Bashir
              wrote on last edited by
              #6

              this will not work when you are moving the folders from one drive to another. like c:\abc to D:\abc

              Q 1 Reply Last reply
              0
              • R Rizwan Bashir

                this will not work when you are moving the folders from one drive to another. like c:\abc to D:\abc

                Q Offline
                Q Offline
                quacks_a_lot
                wrote on last edited by
                #7

                You can add a DirListBox and FileListBox to a form and set the visible property to False. These controls enumerate the folders and files on a computer. Use these controls to get the file names so that you can move them to the next drive creating folders as needed. If you don't want to add controls to your form and figure out how to use them, learn how to use the API functions FindFirstFile, FindNextFile, and FindClose in the kernel32 DLL. I can give you some examples on how to use these calls if you desire.

                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