Magnolia25 has asked for the wisdom of the Perl Monks concerning the following question:
I need to copy the directory and subdirectories to some other location. FROM Path 1: /tmp/home/status/ TO Path2: /home/status/
if user creates any directory tree under Path 1, then my script should check the directory and subdirectories + files created under that and copy the directory structure from Path 1: /tmp/home/status/ to Path2: /home/status/
Now when I run the script again :
1.This time then my script should check the directory and subdirectories + files created under that and copy the directory structure from Path 1: /tmp/home/status/ to Path2: /home/status/ OR 2. ALSO It should see the latest modified directory and subdirectories + files created under that and copy only the latest changes. it would compare two directories (including subdirectories) together and do: - file comparison ... is in directory_1 at source path but not in target path directory_1 - file ... FileX is in both directories, but is modified after previous copy.
Any suggestions how to proceed on this.Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Copy directory structure and only latest changes in them when re-run
by Athanasius (Archbishop) on Nov 20, 2016 at 05:45 UTC | |
|
Re: Copy directory structure and only latest changes in them when re-run
by BrowserUk (Patriarch) on Nov 20, 2016 at 05:51 UTC | |
|
Re: Copy directory structure and only latest changes in them when re-run
by hippo (Archbishop) on Nov 20, 2016 at 12:00 UTC | |
by afoken (Chancellor) on Nov 20, 2016 at 21:05 UTC |