473,698 Members | 2,426 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to use copy function to copy file from one computer to another

rizwan6feb
108 New Member
Hello everybody. I need help on how to use copy function to copy file from one computer to another ( or any other way i can copy the file). The computers are on a local network.
May 27 '08 #1
9 4991
rizwan6feb
108 New Member
Still looking for help
May 27 '08 #2
hsriat
1,654 Recognized Expert Top Contributor
Still looking for help
I really don't want to tell you once again that what you are asking for is not possible.

But you can't do that if the machines are client machines.

I have never used something like this before, so can't really help you.
May 27 '08 #3
Atli
5,058 Recognized Expert Expert
What do you mean by "copy from one computer to another"?

Is one a server and the other a client?
Are they both servers that need to exchange files?
Are they client machines?
What OS are they running?
Do you need this done periodically or just once?

No script running on computer A can access the file system on computer B without some sort of a file-transfer protocol, like say FTP.

Do you have something like that set up?
May 27 '08 #4
rizwan6feb
108 New Member
English is not my native language, that might be creating difficulty in understanding my question, but let me try to explain the scene.

Both computers are on a local network and running WindowsXp. First computer (Computer A) is my PHP server. The second computer (Computer B) is a client with a network connection to Computer A. Whenever a file is uploaded on Computer A, i want to make a copy of that file on Computer B.
May 28 '08 #5
TheServant
1,168 Recognized Expert Top Contributor
English is not my native language, that might be creating difficulty in understanding my question, but let me try to explain the scene.

Both computers are on a local network and running WindowsXp. First computer (Computer A) is my PHP server. The second computer (Computer B) is a client with a network connection to Computer A. Whenever a file is uploaded on Computer A, i want to make a copy of that file on Computer B.
How is it being uploaded on Computer A? B will need to download the target file if it is a client machine. I believe this can be done automatically, but there will need to be some downloading. Maybe something can be done with the network, provided there is a shared harddrive, but if I understand correctly, you will need a script that is run when someone uploads a file on Computer A, which will tell Computer B to download it as well.
May 28 '08 #6
rizwan6feb
108 New Member
copy ("file1.txt","\ \\\computerb\\s hare\\file1.txt ");

This is what i was looking for. The above function copies a file from ComputerA to ComputerB (name is computerb). Computer B has a shared directory which is accessible by Computer A. No ftp, no downloading is required.

Rizwan
May 28 '08 #7
Atli
5,058 Recognized Expert Expert
That should work. Although it may be a little dangerous.
I assume the upload directory will have to be set to give everybody write permission for this to work?

If you want a little more security, I would advice setting up a FTP server on computer B, which computer A could log into before it could copy the file.
It would restrict the access so not everybody could just go in there and mess with your files.
May 28 '08 #8
TheServant
1,168 Recognized Expert Top Contributor
copy ("file1.txt","\ \\\computerb\\s hare\\file1.txt ");

This is what i was looking for. The above function copies a file from ComputerA to ComputerB (name is computerb). Computer B has a shared directory which is accessible by Computer A. No ftp, no downloading is required.

Rizwan
Nice! You learn something new everyday! But as Atli says, it looks very dangerous and I hope you have a lot of security measures before the file is uploaded!
May 28 '08 #9
rizwan6feb
108 New Member
That should work. Although it may be a little dangerous.
I assume the upload directory will have to be set to give everybody write permission for this to work?

If you want a little more security, I would advice setting up a FTP server on computer B, which computer A could log into before it could copy the file.
It would restrict the access so not everybody could just go in there and mess with your files.
Thats right Atli, but i have no idea how to setup an FTP server? I have been reading a tutorial on setting up FTP server, will need help if i face any problem
May 29 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

4
1752
by: GiladP1 | last post by:
Hi, I want to copy protect my application. I want to limit its use for a given period of time, say 30 days, after which a license key will be needed. There are various issues to consider here like: 1) How to keep the installation date on the user's computer so that a simple uninstall and a complete deletion of the application's directory
8
17035
by: Ram Baruch | last post by:
Hi, I'm trying to use the File.Copy() function. It works well when the desenation file is local (Like: C:\dest\dest.exe). The problem is that when I'm trying to copy to a destenation that starts with '\\' it doesnt work and exception is thrown (for example: \\MyComputer\DestDirectory). Even if the first and the second directories are actually the same- the File.Copy() doesn't work. Is there any way to copy a file to a different computer?...
4
3486
by: adnan boz | last post by:
Hi All, Does somebody know why File.Copy function is 10 times slower than standard windows drag and drop copy between folders, when I copy files over the network? Actually, I need to copy files from one computer to another over a 1GBit ethernet network as fast as I can. Although windows copy works at %40 performance, File.Copy could not go further than %4. What could be the reason? What would be the best solution; is it feasible to
7
11624
by: lgbjr | last post by:
Hello All, I¡¯m using a context menu associated with some pictureboxes to provide copy/paste functionality. Copying the image to the clipboard was easy. But pasting an image from the clipboard is proving to be more difficult. These pictureboxes are bound to an AccessDB. If the user wants to add an image, they select an image using an OpenFileDialog: Dim result As DialogResult = Pic_Sel.ShowDialog() If (result = DialogResult.OK) Then
20
1711
by: Paul Bromley | last post by:
Not sure if I can ask the question in this forum - please let me know if it is better elsewhere. Does anyone know of a reasonably priced good copy protection program that will protect software on either a machine only or network range basis?? I have just found Shareguard that looks reasonably priced. My applications are for vertical market and are not likely to be cracked, BUT users are likely to pass working versions around if not...
4
8115
by: eholz1 | last post by:
Hello PHP group, I am trying to use the copy function to copy files from one directory to another. This does not seem to work for me. What am I missing? Below is the code I am using. <?php $filecount = 0;
0
2599
by: Paul Brady | last post by:
I volunteer at a youth ministry agency and help them with their student database. They have two computers, both running Windows XP. Both have Office 2002 installed without Access, except that Computer A had A97. They wanted both computers to be able to use the database, stored on Computer A. I can't get them to do that, and it seems to be a network problem. I installed A2K on each computer, putting it in a special directory which I...
2
2797
by: TwistedPair | last post by:
All, This is sort of a continuation of a previous post of mine. The code below basically reads a registry key to get a path to a folder and it watches for files created in that folder (only created). It also reads another registry key for another path which is a destination path. When a file shows up, it copies it off. It actually works well . . . For small duty stuff but if for example I were to copy in multiple small files...
10
4957
by: Jason | last post by:
I want to create a simple program with Two buttons on the form. BUTTON 1 - BACKUP PREFS this will do the following: Copy C:\Documents and Settings\%USERNAME%\Application Data\FileZilla \sitemanager.xml to this location: \\drake\pvt\%USERNAME%\FileZilla-Prefs\ BUTTON 2 - RESTORE PREFS this will do the opposite:
0
8604
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9160
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9029
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...
1
8897
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8862
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
7729
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...
1
6521
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2002
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.