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#
  4. partition clone with c#

partition clone with c#

Scheduled Pinned Locked Moved C#
csharphelpquestion
9 Posts 7 Posters 2 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.
  • M Offline
    M Offline
    muteb
    wrote on last edited by
    #1

    Is there any way that i can make clone of hard drive c to mu external one by using c# code? can anyone help me with guideline or opensource software which has the desirable method.

    N P M S D 5 Replies Last reply
    0
    • M muteb

      Is there any way that i can make clone of hard drive c to mu external one by using c# code? can anyone help me with guideline or opensource software which has the desirable method.

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      Ummm, maybe a something like, File.Copy ? :rolleyes:


      I know the language. I've read a book. - _Madmatt

      1 Reply Last reply
      0
      • M muteb

        Is there any way that i can make clone of hard drive c to mu external one by using c# code? can anyone help me with guideline or opensource software which has the desirable method.

        P Offline
        P Offline
        PIEBALDconsult
        wrote on last edited by
        #3

        I wouldn't attempt it with managed code.

        M 1 Reply Last reply
        0
        • P PIEBALDconsult

          I wouldn't attempt it with managed code.

          M Offline
          M Offline
          muteb
          wrote on last edited by
          #4

          I'm asking how to do it not should I do it. can anyone please provide me with any clue

          C P 2 Replies Last reply
          0
          • M muteb

            I'm asking how to do it not should I do it. can anyone please provide me with any clue

            C Offline
            C Offline
            Calla
            wrote on last edited by
            #5

            Beside using File.Copy (as mentioned) use methods like Directory.GetDirectories and Directory.GetFiles. Maybe recursive programming will help you out as well..

            1 Reply Last reply
            0
            • M muteb

              Is there any way that i can make clone of hard drive c to mu external one by using c# code? can anyone help me with guideline or opensource software which has the desirable method.

              M Offline
              M Offline
              Md Marufuzzaman
              wrote on last edited by
              #6

              You can try xcopy-tool./[^]

              Thanks Md. Marufuzzaman


              I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.

              1 Reply Last reply
              0
              • M muteb

                Is there any way that i can make clone of hard drive c to mu external one by using c# code? can anyone help me with guideline or opensource software which has the desirable method.

                S Offline
                S Offline
                Stanciu Vlad
                wrote on last edited by
                #7

                Clonning a partition is not an easy task, and by far an easy one to do with managed code. If you want to do a full clone then your aim is to understand partition descriptors, file and folder descriptors and all the stuff that goes behind a file system when it acceses a partition. Why it is necessary to understand them, simple you can't just rely on the file system of an os and there are lots of existing partition types. If you want just to copy all the files from a partition to another you must keep in mind that critical files opened by the operating system and/or applications are not readeable (nor writable) unless they are closed (or opened under special conditions). ps: partition != hard drive :)

                I have no smart signature yet...

                1 Reply Last reply
                0
                • M muteb

                  I'm asking how to do it not should I do it. can anyone please provide me with any clue

                  P Offline
                  P Offline
                  PIEBALDconsult
                  wrote on last edited by
                  #8

                  But if no one thinks you should, no one will tell you how.

                  1 Reply Last reply
                  0
                  • M muteb

                    Is there any way that i can make clone of hard drive c to mu external one by using c# code? can anyone help me with guideline or opensource software which has the desirable method.

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

                    You're not going to do it in managed code. In the simplest form you can do this, it requires that Windows isn't running since there will be plenty of areas of the disk that will be locked and unavailable to even be read. I wrote an app to do this way back in 1991, written in C and running from a DOS boot floppy. I was duplicating hard drives for the mass production of "laptop" computers for Prudential Insurance. Every machine has a standard DOS/Windows/software load that had to be on about 450 machines. For those keeping score, Ghost came out 2 years later in 1993. Yeah, there's my :doh: moment! ...had I only known there was a market...

                    A guide to posting questions on CodeProject[^]
                    Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                         2006, 2007, 2008
                    But no longer in 2009...

                    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