cristofayre has asked for the wisdom of the Perl Monks concerning the following question:
This is what I am trying to achieve. On machineA, there is a folder where images are constantly updated. On machineB, Apache and Perl are running (Windows - maybe Unix). Both are connected via a network, either LAN cable for reliability, or PERHAPS wifi (see below) The idea is that people can log into machineB via wi-fi, and download the photos direct to their phone. (Doing a test with Apache currently running on test machineA, I have found that a phone can log into server using 192.168.0.2, and it displays files in Apache/htdocs. Presumably, to access a script would be 192.168.0.2/cgi-bin/name_of_script ... or a redirect in index.html that takes them to script, or a Rewrite recipe)
Why not run Apache / Perl on host machine? The part that controls the DSLR camera, creates the photos ready for printing etc already needs a fast CPU, such as an i3. To add further processing requirements or dozens of people accessing folders via Wi-fi, it would slow the host machine. Better to spend a few seconds copying each photo as taken to another machine, and let that do the 'donkey work' of displaying / sending pics (That said, I may need machineB to be Unix so it can run several threads for each person accessing the script at the same time)
THIS IS THE QUESTION: The "tricky" part is getting the files from A to B. Am I correct in =THINKING= it would be a simple copy command, with a folder on machineB having a drive letter not used on MachineA (ie "copy C:/xxx to M:/xxx" This could be a simple perl infinate While() loop on machineA that checks the folder every 10 secs, and then initiates the copy if things have changed) Again, I'm thinking the LAN networked machines act as one large PC. Or have I got to connect to machineB via the IP address? I know machineA has a 127.0.0.1 IP localhost / windows host file which runs virtual hosts as development machine
The drive letter approach MAY present a problem. I have multiple partitions on MachineA (C:/, E:/emails, P:/photos, M:/music, G:/extract, O:/ebay, D:/localhost files etc, the idea being if one partition fails,I will not lose the entire contents on the disc) Add in four drive letter assigned to the 4 in 1 card reader ... and virtually all of the A-Z drive letters have been assigned !! Any way around that? (I don't think WIndows will accept double digit drive letters such as "AB", "AC" etc
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Copy files around network
by Corion (Patriarch) on Oct 24, 2019 at 09:06 UTC | |
|
Re: Copy files around network (OT)
by hippo (Archbishop) on Oct 24, 2019 at 09:04 UTC | |
|
Re: Copy files around network
by cristofayre (Sexton) on Oct 24, 2019 at 08:47 UTC |