Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: ftp directories

by earthboundmisfit (Chaplain)
on Sep 14, 2001 at 20:17 UTC ( [id://112454]=note: print w/replies, xml ) Need Help??


in reply to ftp directories

update: Darn it. I just realized this won't work for you. LIST still seems the best way to do this

stat() and File::stat should be able to help in this regard.

$mode gives type as well as permissions.

Replies are listed 'Best First'.
Re: Re: ftp directories
by mbond (Beadle) on Sep 14, 2001 at 20:29 UTC
    I thought of that, but haven't been able to find a way to run it over the ftp connection.

    if i run it locally (@list = stat(FILEHANDLE);)its gonna give me an error because the file is on the remort server. i would have to run it like @list = stat($ftp->get($filename)); .. but that would cause me to retrieve the file, not what i am looking for.

    According the the Net:FTP docs Stat is the FTP stat command, which returns the server status, not of a specific file. (and its not implimented yet from what i can tell)

    Mbond
      >its gonna give me an error because the file is on the remort server.

      Yes, I realized that too late. Could you try a telnet session to each box instead of FTP?

      update: Assuming that's not feasible, you could do $ftp->cwd($path,$filename) If that succeeds, delete it.

Log In?
Username:
Password:

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

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

    No recent polls found