I am trying to list the file of remote host using Net::FTP Perl module. Later I want to download it using put
command.
Will it possible to list the particular file using ls
command
Syntax I am using is:
$remote_dir = "/home/user/test_dir/";
$ftp->cwd($remote_dir);
$file_name = "test.txt";
print $ftp->ls($file_name);
This file is exists in remote server when I tried checking it manually. But listing is not happening.
ftp->ls();
is used for only listing the directory contents or can it be used to list the particular file from a directory as I mentioned above?