MrWho Posted November 24, 2009 Share Posted November 24, 2009 Hey Guys, I need some help ... I need script that will copy files from one local server to another ( hardrive/mounted share) I have something like this in PERL .. if anyone needs it ... but my PHP knowledge and google a temps didn't help ... Script copies all PNG files from Folder A to Folder B + it appends actual date ... use POSIX; use File::Copy; use File::Basename; chdir "//Applications/XAMPP/xamppfiles/htdocs/app/webroot/img" or die "Wait for Automation then run script $!\n" ; for my $file (<*.png>) { my ($name,$path,$suffix) = fileparse($file,".png") ; my $datestamp = strftime("%m_%d_",localtime) ; copy $file,"//Users/ladmin/Desktop/graphs/$datestamp$name$suffix" or warn "Cannot copy $file $!\n" ; } Link to comment https://forums.phpfreaks.com/topic/182819-copy-function/ Share on other sites More sharing options...
mikesta707 Posted November 24, 2009 Share Posted November 24, 2009 have you looked into the copy() function? Link to comment https://forums.phpfreaks.com/topic/182819-copy-function/#findComment-964946 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.