Click here to Skip to main content
15,891,423 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all

Please tell me how to copy perticuler file at 2 different system.
means while coping a file one copy should be in system A and one copy at system B

Both the systems are connected through LAN and all other features including OS and software installed are same for both...

Thank you
Posted
Updated 6-Feb-13 1:58am
v2
Comments
OriginalGriff 6-Feb-13 7:42am    
Exactly how you can do that depends on a lot of factors - none of which you have even mentioned.
Where are the computers, how are they connected, can you run software on both?
Use the "Improve question" widget to edit your question and provide better information.

1 solution

Give the copy command twice: once to copy the file to location A and once to copy it to location B.

VB
File.Copy("SourceFilePath", "DestinationAPath", True)
File.Copy("SourceFilePath", "DestinationBPath", True)
 
Share this answer
 
Comments
H.Brydon 6-Feb-13 13:38pm    
The OP asked about how to copy files between different systems. Your code displays how to do it on one system.
Usha Muhunthan 8-Oct-13 5:28am    
i get error "Logon failure: unknown user name or bad password."

pls help me in this
BotCar 7-Feb-13 0:57am    
You can use the same method to copy files over a LAN. See http://www.vbdotnetforums.com/vb-net-general-discussion/22592-copy-files-over-lan.html
H.Brydon 7-Feb-13 12:54pm    
Ummm yeah but the device mapping part was left out.

Q: How do you send a rocket to the moon?
A: Push the "ignition" button.

This answer, while quite correct, leaves out the important parts and gives the (trivial) final step.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900