Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: copy a directoryby tfrayner (Curate) |
on May 15, 2002 at 11:27 UTC ( [id://166688]=note: print w/replies, xml ) | Need Help?? |
Hi,
Here's how I might do it (if I understand you correctly): Hopefully this should also be moderately portable. Update:Bug fix - the original code would fail to process files in a given directory if the user did not have write permission for that directory (which is what you want to do...duh, silly me). Fixed using the 'postprocess' feature of File::Find to adjust directory permissions after processing the files in that directory.
Good luck, Update2: I just noticed that the perlmonks documentation on File::Find appears to be incomplete. Check out your local 'perldoc File::Find' or go here.
In Section
Seekers of Perl Wisdom
|
|