in reply to Re: Copy Files from network
in thread Copy Files from network

Network: LAN

I am using a Perl script for this

I cannot show the entire flow of the code as its part of huge script. But here is the logic.
1. read file names ( file names always change) from a file into an array
2. copy from a LAN folder to local folder
Currently I use the system opy command to copy files
3. Copy from Local folder into 5 other LAN folders.

I do not know much about forks / threads and how this works. I feel if I can copy more than 1 file at a time it will greatly reduce the script execution time.

Replies are listed 'Best First'.
Re^3: Copy Files from network
by BrowserUk (Patriarch) on Nov 16, 2004 at 23:47 UTC

    I suggest you take a look at Parallel::ForkManager. The second example uses LWP, where you just need to use

    system qq[copy \\\\srcserver\\path\\to\\source.fil \\\\dstserver\\path +\\to\destination.fil];

    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail        "Time is a poor substitute for thought"--theorbtwo
    "Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon