Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Re: Delete folders via FTP

by new_monk (Sexton)
on Feb 09, 2004 at 00:58 UTC ( [id://327527]=note: print w/replies, xml ) Need Help??


in reply to Re: Delete folders via FTP
in thread Delete folders via FTP

If the directory does not have anything in it then it would throw an error? In order to delete a folder there has to be some file or other sub directory in order for rmdir() to work?

Replies are listed 'Best First'.
Re: Re: Re: Delete folders via FTP
by z3d (Scribe) on Feb 09, 2004 at 01:56 UTC
    Reverse - you can't delete a dir if it still has content. I don't see where you validate in your code that the directory is empty - do you know it is empty already?



    "I have never written bad code. There are merely unanticipated features."
      I did not know it was supposed to be empty in order for the delete to work. We delete these directories at the end of the day regardless of content. They do have some subdirectories and *.rdb files that are discarded daily. How would I delete everything under iq whether its empty or contains data? We usually telnet into the server and do a rm -r * to remove the folders.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-03-29 14:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found