in reply to Re: Need Net::FTP delete help
in thread Need Net::FTP delete help

Net::FTP::delete will return a true if it deletes the file
if ( $ftp->delete ( "$Target/$FileName" ) ) { print "File <$Target/$FileName> was deleted\n"; } else { print "File <$Target/$FileName> failed to delete\n"; }
I can delete from bash on the server. I have no idea about ftp on Windows as it doesn't support passive and my ftp sever kick it out with great disdain

The file permissions are all 0755

I could try from a Linux ftp terminal, but that would be cheating

I finally broke down and created a cronjob on the ftp server that calls a perl 5 script that changes all files and directories on the target ftp directories that start with a "." to "dot."

-T

Replies are listed 'Best First'.
Re^3: Need Net::FTP delete help
by Corion (Patriarch) on Feb 08, 2017 at 09:35 UTC

    I asked:

    Does deleting a file with a dot at the start of the name work from the command line ftp client?

    I take this as you trying to address this:

    I can delete from bash on the server.

    This is not what I meant. I meant using a remote machine, using another ftp client.

    If you cannot delete the file using any other FTP client via the ftp server, then the problem is not with Net::FTP but most likely with the ftp server.

    If the Windows default client does not support passive mode, then maybe you can check using curl or wget, or some other approach with a client separate from Net::FTP.