Using of SharpBITS to copy a file about filesystem?

Mar 2, 2012 at 10:28 PM

Hi,

at the first, pleace appologize my poor english, I hope it is clear for you what I mean...

To copy big files from a laptop to a server about a very smal connection I need a solution to do the copy without any problems for the users there are connected about the same connection. I our case all users on the client site are affected until the file is not successfully copied.

I think to use BITS is the best way, but I read a lot of documents and in all documentation the BITS is used in cases to download a file from a web-space.

Can I use BITS also to copy a file between to servers (about filesystem)?

If yes, where can I get sample code to use SharpBITS within managed code?

For your information and answer thank you very much in advance.

Regards,
Maximilian

Coordinator
Mar 3, 2012 at 5:29 AM

BITS does support file transfer on http, ftp and smb. Instead of providing an http URL, you just need to specify the source file on smb path, like \\servername\sharename$\folder\filename.ect. Doesn't matter if you prefer Upload or Download in Direction just set the source and destination property accordingly. Remember that BITS service is running in a service context so it will not be able to use your local user's mapped drives/drive letters.

To get some sample code just download the source which contains a little console app showing use of most of the features.