Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Need Net::FTP delete help

by Anonymous Monk
on Feb 08, 2017 at 09:24 UTC ( [id://1181384]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1181384]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-26 03:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found