473,425 Members | 1,835 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,425 software developers and data experts.

How to copy files across network without using network share

How do I programmatically copy files across a network (from a local
workstation to another local workstation on the network) using visual basic
2005?
In other words, when in explorer and you enter a unc path to a network
workstation, you are prompted with a dialog box asking for the user name and
password that has access rights to that computer. After validating, you can
access the files on the remote pc just like you can on your own pc, at which
point you could copy files to the remote pc.
I am trying to copy files to a remote pc and need to know how to do the
above in code.
Any help would be appreciated.
--
Sean McIntire
Jun 21 '07 #1
3 16957
Well i copy with my programs just over the UNC paths but indeed my program
is running with the apropriate rights

So the trick is to give the program the right user credentials ( one that
has the apropriate rights on the target system ) , this is also possible
through code

"SeanMac" <Se*****@discussions.microsoft.comschreef in bericht
news:F6**********************************@microsof t.com...
How do I programmatically copy files across a network (from a local
workstation to another local workstation on the network) using visual
basic
2005?
In other words, when in explorer and you enter a unc path to a network
workstation, you are prompted with a dialog box asking for the user name
and
password that has access rights to that computer. After validating, you
can
access the files on the remote pc just like you can on your own pc, at
which
point you could copy files to the remote pc.
I am trying to copy files to a remote pc and need to know how to do the
above in code.
Any help would be appreciated.
--
Sean McIntire

Jun 22 '07 #2
How do you do this in code?
--
Sean McIntire
"Michel Posseth [MCP]" wrote:
Well i copy with my programs just over the UNC paths but indeed my program
is running with the apropriate rights

So the trick is to give the program the right user credentials ( one that
has the apropriate rights on the target system ) , this is also possible
through code

"SeanMac" <Se*****@discussions.microsoft.comschreef in bericht
news:F6**********************************@microsof t.com...
How do I programmatically copy files across a network (from a local
workstation to another local workstation on the network) using visual
basic
2005?
In other words, when in explorer and you enter a unc path to a network
workstation, you are prompted with a dialog box asking for the user name
and
password that has access rights to that computer. After validating, you
can
access the files on the remote pc just like you can on your own pc, at
which
point you could copy files to the remote pc.
I am trying to copy files to a remote pc and need to know how to do the
above in code.
Any help would be appreciated.
--
Sean McIntire


Jun 22 '07 #3
Even though the following article says 'asp.net' in the title, it is
actually
applicable to what you want to do (impersonate a specific user).

http://support.microsoft.com/kb/306158

and another good explanatation with example code

http://www.eggheadcafe.com/articles/20020418.asp

regards

HTH

Michel Posseth



"SeanMac" <Se*****@discussions.microsoft.comschreef in bericht
news:42**********************************@microsof t.com...
How do you do this in code?
--
Sean McIntire
"Michel Posseth [MCP]" wrote:
>Well i copy with my programs just over the UNC paths but indeed my
program
is running with the apropriate rights

So the trick is to give the program the right user credentials ( one that
has the apropriate rights on the target system ) , this is also possible
through code

"SeanMac" <Se*****@discussions.microsoft.comschreef in bericht
news:F6**********************************@microso ft.com...
How do I programmatically copy files across a network (from a local
workstation to another local workstation on the network) using visual
basic
2005?
In other words, when in explorer and you enter a unc path to a network
workstation, you are prompted with a dialog box asking for the user
name
and
password that has access rights to that computer. After validating,
you
can
access the files on the remote pc just like you can on your own pc, at
which
point you could copy files to the remote pc.
I am trying to copy files to a remote pc and need to know how to do the
above in code.
Any help would be appreciated.
--
Sean McIntire



Jun 22 '07 #4

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

Similar topics

6
by: Damon Grieves | last post by:
Hi I just want to be sure I understand how the Access client works. If I have an Access back end with a million records on a server and an Access client. If the client is installed on the users pc...
3
by: Divya | last post by:
Hello, I am trying to copy a file from one domain to another. I have the username and password of the destination domain. I tried a few approaches - 1. Using the Impersonator Class -...
2
by: Stu | last post by:
Using IIs 6.0 on a Server 2003 box, and using ASP.NET I'm trying to do the following code snippit... Dim NewName As String = "\\network_share_path\edit_me.ppt" Dim PubName As String =...
1
by: medvitz | last post by:
I'm writing an ASP.NET application that requires that a list of files from a network shre be displayed on the site. We are using windows integrated authorizations and impersonation. Whenever I...
2
by: Michael | last post by:
We have an ASP.NET 2.0 web application running on a Windows 2003 domain controller. Part of that application needs to read and write files from and to a network share ( living on a MAC Xserveraid)...
0
by: jonoaustin | last post by:
Hi there I need to be able to copy some files between two different network share locations using credentials other than the logged in user (AD domain based users). Is there a simple way to...
4
by: sajid_yusuf | last post by:
Hi I am trying to develop a Windows service in VB.NET which has timer enabled and keeps checking a folder (or group of folders) for any new file or changed files. As soon as it detects any new...
3
by: Code Monkey | last post by:
I've written a windows service in C#. The service copies certain files using a FileSystemWatcher. However, where it copies the files to is a windows share (\\ipaddress \sharename). If I set...
1
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
Using .NET 2.0 is it more efficient to copy files to a single folder versus spreading them across multiple folders. For instance if we have 100,000 files to be copied, Do we copy all of them to...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.