I am trying to synchronize files on my office Server (local machine) with files on a Unix W/S (remote machine) using Net::FTP.  There are methods available to get the modification time ($ftp->mdtm ($remote_file)) and size ($ftp->size ($remote_file)) of the remote files.  When files are transferred from the remote machine to the local machine, I use the Perl function utime to change the modification time of the local file to match that of the corresponding remote file.

 

Is there a way to change to modification time of the remote file to match that of the local file if I need to “put” the local file to the remote machine?

 

Thank you in advance.

 

 

<snip>

 

my $rmodtime = $ftp->mdtm ($remote_file);

my $getrv = $ftp->get ($remote_file, $local_file);

my $now = time;

utime $now, $rmodtime, $getrv;

 

<snip>

 

 

Regards,

 

Sui Ming Louie

www.ftlstudio.com

 

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to