Good morning wise monks!
I am working on improving a script that I have written which does some file transfers based on directory listing comparisons. I have basically read a remote directory and local directory listing (a la $ftp->ls() and readdir) into two separate arrays and used the List::Compare module to compare the contents of them ($lc->get_unique). If there are "new" files in the remote directory, they are retrieved to the local directory. What I would like to do now, is compare the local directory to a third (also local) directory. If any files exist in both local directories, then I don't want the script to retrieve these files from the remote directory (i.e. the files are retrieved to local directory #1 then copied to local directory #2, but I don't ever want any duplicates to end up in local directory #2). Any suggestions about what may be the best way to accomplish this task would be greatly appreciated! Thanks!
In reply to Directory comparisons by joeymac
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |