I am uploading the folder from local to FTP using perl Net::FTP::Recursive module. I have written the sample code below. In that code I need to know the status of the uploading process like whether it has been uploaded or not.
use strict;
use Net::FTP:recursive;
my $ftp_con= Net::FTP::Recursive->new('host.com',Debug=>0);
$ftp_con->login('username','password');
$ftp_con->rput('d:\my_test','\root\my_test');
$ftp_con->quit;
In the above code I am unable to find the status of the uploading. Can anyone suggest me to get the uploading status of the folder, whether the folder has been uploaded or not.
Thanks…
Subclass
Net::FTP::Recursiveto override_rput. Add a callback hook to the end of theforeachblock and pass in the current file$fileand the list of files@filesas arguments.In the main part of the code, count up each time the callback is called and calculating the progress from the counter and the number of elements in
@files.