robocopy equivalent in C#

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?TmlraGlsU2luZ2hhbA==?=

    robocopy equivalent in C#

    Hi,
    I am building an application that requires copy a decent number of files
    around. Till now, to demonstrate the prrof of concept, I used pInvoke to
    invoke robocopy to do all the heavy lifting.

    Is there any .Net component that I can build/download/buy that will allow me
    basic robocopy features such as retry, wait, mirror, file ACL's copy, etc.

    Thanks,
    Nikhil Singhal

  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: robocopy equivalent in C#

    Nikhil,

    There might be, but it's not included out-of-the box.

    You say you are calling the RoboCopy components through the P/Invoke
    layer. Why not just continue to call them through the P/Invoke layer?


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m

    "NikhilSing hal" <NikhilSinghal@ discussions.mic rosoft.comwrote in message
    news:C7F1C3E0-FB1C-45A5-8733-23A37B2E8C0C@mi crosoft.com...
    Hi,
    I am building an application that requires copy a decent number of files
    around. Till now, to demonstrate the prrof of concept, I used pInvoke to
    invoke robocopy to do all the heavy lifting.
    >
    Is there any .Net component that I can build/download/buy that will allow
    me
    basic robocopy features such as retry, wait, mirror, file ACL's copy, etc.
    >
    Thanks,
    Nikhil Singhal
    >

    Comment

    • =?Utf-8?B?TmlraGlsU2luZ2hhbA==?=

      #3
      Re: robocopy equivalent in C#

      I would have loved to continue the use the ribustness of robocopy, but there
      are redistribution, packaging issues. Furthermore, requiring the customers to
      download something before they can run my app is just not pleasing my bosses.

      I would love to hear your other solutions.

      Thanks
      Nikhil

      "Nicholas Paldino [.NET/C# MVP]" wrote:
      Nikhil,
      >
      There might be, but it's not included out-of-the box.
      >
      You say you are calling the RoboCopy components through the P/Invoke
      layer. Why not just continue to call them through the P/Invoke layer?
      >
      >
      --
      - Nicholas Paldino [.NET/C# MVP]
      - mvp@spam.guard. caspershouse.co m
      >
      "NikhilSing hal" <NikhilSinghal@ discussions.mic rosoft.comwrote in message
      news:C7F1C3E0-FB1C-45A5-8733-23A37B2E8C0C@mi crosoft.com...
      Hi,
      I am building an application that requires copy a decent number of files
      around. Till now, to demonstrate the prrof of concept, I used pInvoke to
      invoke robocopy to do all the heavy lifting.

      Is there any .Net component that I can build/download/buy that will allow
      me
      basic robocopy features such as retry, wait, mirror, file ACL's copy, etc.

      Thanks,
      Nikhil Singhal
      >
      >
      >

      Comment

      • Kalpesh

        #4
        Re: robocopy equivalent in C#

        Nikhil,

        Out of curiosity, what is it that robocopy does that normal copy
        wouldn't do?
        I understand that Robocopy is a special purpose solution for file
        copying.

        Does the normal copying affect things in any way that makes you use
        robocopy?
        Also, if your network (intranet) is open - you can keep a network
        share that has robocopy executables.

        You can than call robocopy executable from your .net application.

        HTH
        Kalpesh

        Comment

        • =?Utf-8?B?TmlraGlsU2luZ2hhbA==?=

          #5
          Re: robocopy equivalent in C#

          Some of the specific features of robocopy that make it interesting are the
          1. retry
          2. wait
          3. mirror
          4. copy ACL's

          The goal is to remove dependency from robocopy binary. These machines would
          be in a production data center and will be tightly locked down.

          Thanks
          Nikhil

          "Kalpesh" wrote:
          Nikhil,
          >
          Out of curiosity, what is it that robocopy does that normal copy
          wouldn't do?
          I understand that Robocopy is a special purpose solution for file
          copying.
          >
          Does the normal copying affect things in any way that makes you use
          robocopy?
          Also, if your network (intranet) is open - you can keep a network
          share that has robocopy executables.
          >
          You can than call robocopy executable from your .net application.
          >
          HTH
          Kalpesh
          >

          Comment

          • John Timney \(MVP\)

            #6
            Re: robocopy equivalent in C#

            Well your bosses are wrong if you have to create something you can already
            get with no investment.

            If your software was going into one of my datacentres I would make sure that
            the components needed were delivered and installed, whether there was 1 item
            or 1000. Robocopy is one of those trusted components used in datacentres
            all over the place and it would simply be added to whatever build approach
            was needed. Its simply a pre-requisite.

            Regards

            John Timney (MVP)




            "NikhilSing hal" <NikhilSinghal@ discussions.mic rosoft.comwrote in message
            news:86252162-0E44-4293-B116-B9556D1FC2A6@mi crosoft.com...
            Some of the specific features of robocopy that make it interesting are the
            1. retry
            2. wait
            3. mirror
            4. copy ACL's
            >
            The goal is to remove dependency from robocopy binary. These machines
            would
            be in a production data center and will be tightly locked down.
            >
            Thanks
            Nikhil
            >
            "Kalpesh" wrote:
            >
            >Nikhil,
            >>
            >Out of curiosity, what is it that robocopy does that normal copy
            >wouldn't do?
            >I understand that Robocopy is a special purpose solution for file
            >copying.
            >>
            >Does the normal copying affect things in any way that makes you use
            >robocopy?
            >Also, if your network (intranet) is open - you can keep a network
            >share that has robocopy executables.
            >>
            >You can than call robocopy executable from your .net application.
            >>
            >HTH
            >Kalpesh
            >>

            Comment

            • =?Utf-8?B?TmlraGlsU2luZ2hhbA==?=

              #7
              Re: robocopy equivalent in C#

              I 100% agree with you John.

              Do you know what the re-distribution policy on Robocopy is?
              Can I bundle it with my app?

              Thanks
              Nikhil

              "John Timney (MVP)" wrote:
              Well your bosses are wrong if you have to create something you can already
              get with no investment.
              >
              If your software was going into one of my datacentres I would make sure that
              the components needed were delivered and installed, whether there was 1 item
              or 1000. Robocopy is one of those trusted components used in datacentres
              all over the place and it would simply be added to whatever build approach
              was needed. Its simply a pre-requisite.
              >
              Regards
              >
              John Timney (MVP)


              >
              >
              "NikhilSing hal" <NikhilSinghal@ discussions.mic rosoft.comwrote in message
              news:86252162-0E44-4293-B116-B9556D1FC2A6@mi crosoft.com...
              Some of the specific features of robocopy that make it interesting are the
              1. retry
              2. wait
              3. mirror
              4. copy ACL's

              The goal is to remove dependency from robocopy binary. These machines
              would
              be in a production data center and will be tightly locked down.

              Thanks
              Nikhil

              "Kalpesh" wrote:
              Nikhil,
              >
              Out of curiosity, what is it that robocopy does that normal copy
              wouldn't do?
              I understand that Robocopy is a special purpose solution for file
              copying.
              >
              Does the normal copying affect things in any way that makes you use
              robocopy?
              Also, if your network (intranet) is open - you can keep a network
              share that has robocopy executables.
              >
              You can than call robocopy executable from your .net application.
              >
              HTH
              Kalpesh
              >
              >
              >
              >

              Comment

              • John Timney \(MVP\)

                #8
                Re: robocopy equivalent in C#

                Last time I checked it was in the resource kit. While you can't charge for
                it and as long as the user has a valid Windows Server 2003 license you can
                include all of Resource Kit tools.

                Regards

                John Timney (MVP)




                "NikhilSing hal" <NikhilSinghal@ discussions.mic rosoft.comwrote in message
                news:FBA1AE9B-E448-46AB-9426-3377F4153A2A@mi crosoft.com...
                >I 100% agree with you John.
                >
                Do you know what the re-distribution policy on Robocopy is?
                Can I bundle it with my app?
                >
                Thanks
                Nikhil
                >
                "John Timney (MVP)" wrote:
                >
                >Well your bosses are wrong if you have to create something you can
                >already
                >get with no investment.
                >>
                >If your software was going into one of my datacentres I would make sure
                >that
                >the components needed were delivered and installed, whether there was 1
                >item
                >or 1000. Robocopy is one of those trusted components used in datacentres
                >all over the place and it would simply be added to whatever build
                >approach
                >was needed. Its simply a pre-requisite.
                >>
                >Regards
                >>
                >John Timney (MVP)
                >http://www.johntimney.com
                >http://www.johntimney.com/blog
                >>
                >>
                >"NikhilSinghal " <NikhilSinghal@ discussions.mic rosoft.comwrote in
                >message
                >news:8625216 2-0E44-4293-B116-B9556D1FC2A6@mi crosoft.com...
                Some of the specific features of robocopy that make it interesting are
                the
                1. retry
                2. wait
                3. mirror
                4. copy ACL's
                >
                The goal is to remove dependency from robocopy binary. These machines
                would
                be in a production data center and will be tightly locked down.
                >
                Thanks
                Nikhil
                >
                "Kalpesh" wrote:
                >
                >Nikhil,
                >>
                >Out of curiosity, what is it that robocopy does that normal copy
                >wouldn't do?
                >I understand that Robocopy is a special purpose solution for file
                >copying.
                >>
                >Does the normal copying affect things in any way that makes you use
                >robocopy?
                >Also, if your network (intranet) is open - you can keep a network
                >share that has robocopy executables.
                >>
                >You can than call robocopy executable from your .net application.
                >>
                >HTH
                >Kalpesh
                >>
                >>
                >>
                >>

                Comment

                • =?Utf-8?B?TmlraGlsU2luZ2hhbA==?=

                  #9
                  Re: robocopy equivalent in C#

                  Most likely, the management "may" decide in future to charge for this tool.

                  Do you know of any .Net based API's that have similar functionality as
                  robocopy?

                  Thanks
                  Nikhil

                  "John Timney (MVP)" wrote:
                  Last time I checked it was in the resource kit. While you can't charge for
                  it and as long as the user has a valid Windows Server 2003 license you can
                  include all of Resource Kit tools.
                  >
                  Regards
                  >
                  John Timney (MVP)


                  >
                  >
                  "NikhilSing hal" <NikhilSinghal@ discussions.mic rosoft.comwrote in message
                  news:FBA1AE9B-E448-46AB-9426-3377F4153A2A@mi crosoft.com...
                  I 100% agree with you John.

                  Do you know what the re-distribution policy on Robocopy is?
                  Can I bundle it with my app?

                  Thanks
                  Nikhil

                  "John Timney (MVP)" wrote:
                  Well your bosses are wrong if you have to create something you can
                  already
                  get with no investment.
                  >
                  If your software was going into one of my datacentres I would make sure
                  that
                  the components needed were delivered and installed, whether there was 1
                  item
                  or 1000. Robocopy is one of those trusted components used in datacentres
                  all over the place and it would simply be added to whatever build
                  approach
                  was needed. Its simply a pre-requisite.
                  >
                  Regards
                  >
                  John Timney (MVP)


                  >
                  >
                  "NikhilSing hal" <NikhilSinghal@ discussions.mic rosoft.comwrote in
                  message
                  news:86252162-0E44-4293-B116-B9556D1FC2A6@mi crosoft.com...
                  Some of the specific features of robocopy that make it interesting are
                  the
                  1. retry
                  2. wait
                  3. mirror
                  4. copy ACL's

                  The goal is to remove dependency from robocopy binary. These machines
                  would
                  be in a production data center and will be tightly locked down.

                  Thanks
                  Nikhil

                  "Kalpesh" wrote:

                  Nikhil,
                  >
                  Out of curiosity, what is it that robocopy does that normal copy
                  wouldn't do?
                  I understand that Robocopy is a special purpose solution for file
                  copying.
                  >
                  Does the normal copying affect things in any way that makes you use
                  robocopy?
                  Also, if your network (intranet) is open - you can keep a network
                  share that has robocopy executables.
                  >
                  You can than call robocopy executable from your .net application.
                  >
                  HTH
                  Kalpesh
                  >
                  >
                  >
                  >
                  >
                  >
                  >

                  Comment

                  • John Timney \(MVP\)

                    #10
                    Re: robocopy equivalent in C#

                    If they charge for it, they will be in breach of the permitted licence.

                    I'm not aware of any api functionality to mimic robocopy.

                    Regards

                    John Timney (MVP)




                    "NikhilSing hal" <NikhilSinghal@ discussions.mic rosoft.comwrote in message
                    news:18D550D8-CAA2-4FE9-92A6-12DF9DDECE59@mi crosoft.com...
                    Most likely, the management "may" decide in future to charge for this
                    tool.
                    >
                    Do you know of any .Net based API's that have similar functionality as
                    robocopy?
                    >
                    Thanks
                    Nikhil
                    >
                    "John Timney (MVP)" wrote:
                    >
                    >Last time I checked it was in the resource kit. While you can't charge
                    >for
                    >it and as long as the user has a valid Windows Server 2003 license you
                    >can
                    >include all of Resource Kit tools.
                    >>
                    >Regards
                    >>
                    >John Timney (MVP)
                    >http://www.johntimney.com
                    >http://www.johntimney.com/blog
                    >>
                    >>
                    >"NikhilSinghal " <NikhilSinghal@ discussions.mic rosoft.comwrote in
                    >message
                    >news:FBA1AE9 B-E448-46AB-9426-3377F4153A2A@mi crosoft.com...
                    >I 100% agree with you John.
                    >
                    Do you know what the re-distribution policy on Robocopy is?
                    Can I bundle it with my app?
                    >
                    Thanks
                    Nikhil
                    >
                    "John Timney (MVP)" wrote:
                    >
                    >Well your bosses are wrong if you have to create something you can
                    >already
                    >get with no investment.
                    >>
                    >If your software was going into one of my datacentres I would make
                    >sure
                    >that
                    >the components needed were delivered and installed, whether there was
                    >1
                    >item
                    >or 1000. Robocopy is one of those trusted components used in
                    >datacentres
                    >all over the place and it would simply be added to whatever build
                    >approach
                    >was needed. Its simply a pre-requisite.
                    >>
                    >Regards
                    >>
                    >John Timney (MVP)
                    >http://www.johntimney.com
                    >http://www.johntimney.com/blog
                    >>
                    >>
                    >"NikhilSinghal " <NikhilSinghal@ discussions.mic rosoft.comwrote in
                    >message
                    >news:8625216 2-0E44-4293-B116-B9556D1FC2A6@mi crosoft.com...
                    Some of the specific features of robocopy that make it interesting
                    are
                    the
                    1. retry
                    2. wait
                    3. mirror
                    4. copy ACL's
                    >
                    The goal is to remove dependency from robocopy binary. These
                    machines
                    would
                    be in a production data center and will be tightly locked down.
                    >
                    Thanks
                    Nikhil
                    >
                    "Kalpesh" wrote:
                    >
                    >Nikhil,
                    >>
                    >Out of curiosity, what is it that robocopy does that normal copy
                    >wouldn't do?
                    >I understand that Robocopy is a special purpose solution for file
                    >copying.
                    >>
                    >Does the normal copying affect things in any way that makes you use
                    >robocopy?
                    >Also, if your network (intranet) is open - you can keep a network
                    >share that has robocopy executables.
                    >>
                    >You can than call robocopy executable from your .net application.
                    >>
                    >HTH
                    >Kalpesh
                    >>
                    >>
                    >>
                    >>
                    >>
                    >>
                    >>

                    Comment

                    Working...