Couldn't open remote file 'test.txt': No such file.
Couldn't delete remote file: No such file. - test.txt
I am trying to get all files (*) and there is one file on the remote server named test.txt. Here is my code:We are using Net::SFTP::Foreign, v1.65, Solaris 10, and OpenSSH_5.8p2. When I manually connect to the SFTP site with the server's built-in SFTP client, I can get the file without any error messages. Any help with these errors would be great appreciated. Thanks!if (lc($transfertype) eq "get"){ $sftp_connection->setcwd($remote_dir); foreach my $file (@file_globs){ my @files = $sftp_connection->glob($file); foreach my $element (@files){ #if the remote file is a directory, we want to skip it. if (${$element}{longname} =~ /^d.*$/){ next; } else { $sftp_connection->get(${$element}{filename}, $local_di +r.${$element}{filename}); if ($sftp_connection->error == 0){ &logEntry($args{'logfile'}, "$jobname--Getting rem +ote file: \/".$remote_dir.${$element}{filename}); } elsif ($sftp_connection->error != 0){ &logEntry($args{'logfile'}, "$jobname-ERROR: ".$sf +tp_connection->error); } if ($delete_remote_files == 1){ $sftp_connection->remove(${$element}{filename}); if ($sftp_connection->error == 0){ &logEntry($args{'logfile'}, "$jobname--Deletin +g remote file:\/".$remote_dir."\/".${$element}{filename}); } elsif ($sftp_connection->error != 0){ &logEntry($args{'logfile'}, "$jobname-ERROR: " +.$sftp_connection->error." - ${$element}{filename}"); } } } } } }
In reply to Net::SFTP::Foreign stat Error by csftpteam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |