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


In reply to Copy files around network by cristofayre

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.