473,473 Members | 2,097 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

Jan 28 '08 #1
9 14711
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]
- mv*@spam.guard.caspershouse.com

"NikhilSinghal" <Ni***********@discussions.microsoft.comwrote in message
news:C7**********************************@microsof t.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

Jan 28 '08 #2
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]
- mv*@spam.guard.caspershouse.com

"NikhilSinghal" <Ni***********@discussions.microsoft.comwrote in message
news:C7**********************************@microsof t.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


Jan 28 '08 #3
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
Jan 28 '08 #4
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
Jan 28 '08 #5
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" <Ni***********@discussions.microsoft.comwrote in message
news:86**********************************@microsof t.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

Jan 28 '08 #6
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" <Ni***********@discussions.microsoft.comwrote in message
news:86**********************************@microsof t.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


Jan 28 '08 #7
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" <Ni***********@discussions.microsoft.comwrote in message
news:FB**********************************@microsof t.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" <Ni***********@discussions.microsoft.comwrote in
message
news:86**********************************@microso ft.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



Jan 28 '08 #8
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" <Ni***********@discussions.microsoft.comwrote in message
news:FB**********************************@microsof t.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" <Ni***********@discussions.microsoft.comwrote in
message
news:86**********************************@microsof t.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



Jan 29 '08 #9
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)
http://www.johntimney.com
http://www.johntimney.com/blog
"NikhilSinghal" <Ni***********@discussions.microsoft.comwrote in message
news:18**********************************@microsof t.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" <Ni***********@discussions.microsoft.comwrote in
message
news:FB**********************************@microso ft.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" <Ni***********@discussions.microsoft.comwrote in
message
news:86**********************************@microso ft.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




Jan 30 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: John | last post by:
Is there an equivalent of COM on Linux that I can get through Python. My need is to have some sort of language independent component framework. I can think of CORBA but I have to have a server...
2
by: Michael Foord | last post by:
Please pardon my ignorance on this one - but I'm not certain how the sign bt is treated in python bitwise operators. I've trying to convert a javascript DES encryption routine into python. ...
3
by: Robert Dodier | last post by:
Hello, Here's a thought that I'm sure has already occurred to someone else, I just can't find any record of it yet. An XML document is just a more verbose and clumsy representation of an...
1
by: Vannela | last post by:
Is there any equivalent control in .NET for the Power builder DataWindow control? I am explaining the Datawindow architecture to some extent. Power Builder DataWindow Control has got different...
7
by: Tim Conner | last post by:
Hi, I am an ex-delphi programmer, and I having a real hard time with the following simple code (example ): Which is the equivalent to the following code ? var chars : PChar; sBack, s :...
10
by: karch | last post by:
How would this C# contruct be represented in C++/CLI? Or is it even possible? PolicyLevel level = (enumerator->Current) as PolicyLevel; Thanks, Karch
0
by: Versteijn | last post by:
Hello all, I am looking for a .net component (at best native .net) that has the same functionality as the Robocopy commandline application. I.e. (cascade) copying of files, maintaining...
9
by: Alan Silver | last post by:
Hello, I'm converting some old VB6 code to use with ASP.NET and have come unstuck with the Asc() function. This was used in the old VB6 code to convert a character to its ASCII numeric...
14
by: grid | last post by:
Hi, I have a certain situation where a particular piece of code works on a particular compiler but fails on another proprietary compiler.It seems to have been fixed but I just want to confirm if...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.