Home: Perl Programming Help: Frequently Asked Questions:
How do I delete a directory?



Jasmine
Administrator

Dec 9, 2000, 9:55 AM


Views: 10860
How do I delete a directory?

How do I delete a directory?

View post


sleuth
Enthusiast

Dec 12, 2000, 12:42 AM


Views: 10857
Re: How do I delete a directory?

I couldn't find where that post is now, with the new change, but to delete a directory, you must first delete it's contents like so

unlink "/home/data/public_html/directory/*";

Then use rmdir; remove directory.

rmdir "/home/data/public_html/directory";

Sleuth