473,608 Members | 2,479 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to copy files across network without using network share

How do I programmaticall y 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 16993
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*****@discus sions.microsoft .comschreef in bericht
news:F6******** *************** ***********@mic rosoft.com...
How do I programmaticall y 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*****@discus sions.microsoft .comschreef in bericht
news:F6******** *************** ***********@mic rosoft.com...
How do I programmaticall y 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*****@discus sions.microsoft .comschreef in bericht
news:42******** *************** ***********@mic rosoft.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*****@discus sions.microsoft .comschreef in bericht
news:F6******* *************** ************@mi crosoft.com...
How do I programmaticall y 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
2122
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 and run by the user...does Access drag the whole million records across the LAN when we call up one record ie filters for that record locally? If the client is on the same server as the back end, and the user starts up the client on the server...
3
15981
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 - http://www.codeproject.com/useritems/ZetaImpersonator.asp 2. Using WebRequest object to write the file to the destination domain - http://www.dotnet247.com/247reference/msgs/42/211482.aspx
2
3569
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 = "\\network_share_path\show_me.ppt" Dim PubFile As System.IO.File If PubFile.Exists(PubName) Then
1
1388
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 try to access the network share I get the following error. DirectoryNotFoundException saying "Could not find a part of the path "\\server\share" In looking to solve this, I have come across multiple items discussing the double hop...
2
2415
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) on the same network segment. I mapped a drive on the server to that share. When mapping the drive, I could enter access credentials for the shares (an account from the Mac side that does not exist in the windows domain). Using Windows Explorer,...
0
2269
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 specify these credentials using system.io.file? I'm pretty sure I'm missing something obvious here. Cheers!
4
11725
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 file or changes (to files or folders) then it copies the files (and any new folders) to a folder in the mapped network drive. So far I have been successful in developing and deploying the service which works on my local machine with two drives...
3
2921
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 the service up and run it as a user who has access to this share -
1
3878
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 a single folder called 'All Files' Do we spread them out and copy them to multiple folders like Folder 000 - Copy files from 0 to 1000 Folder 001 - Copy files from 1000 to 2000 Folder 002 - Copy files from 2000 to 2999
0
8059
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8470
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8330
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6815
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5475
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4023
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2474
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1589
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1328
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.