
FishMonger
Veteran
Aug 1, 2010, 9:56 AM
Post #9 of 13
(1156 views)
|
|
Re: [Shazer2] Problem with Backup Script
[In reply to]
|
Can't Post
|
|
Or just supply me with a backup script which finds the original folder then saves in a different location. You haven't provided enough info for anyone to be able to do that and we are here to assist you in troubleshooting your script. It's beyond the scope of this forum to provide complete custom scripts. Based on the minimum program specs that you've given, I would not manually traverse and directory tree, especially not the way your friend coded it. Instead I'd use a utility that is designed for backing up directories. The first one that comes to mind, due to it's cross platform portability, is rsync. Perl has modules that interface with this utility. http://search.cpan.org/~leakin/File-Rsync-0.43/Rsync.pm Another option, if you don't want to use external utilities, would be to use the File::Copy::Recursive module. http://search.cpan.org/~dmuey/File-Copy-Recursive-0.38/Recursive.pm
I need the code which I can just drop straight into Python What do you mean? Perl and Python are different languages with different syntax. You can't just drop one into the other. Do you mean that you have a python script that will execute the perl script? If so, then that has no bearing on the Perl script or your base question/problem.
|