CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Directory Delete Command???

 



Kris
Deleted

Apr 14, 2000, 2:29 PM

Post #1 of 3 (462 views)
Directory Delete Command??? Can't Post

I am creating a script for Webhome that requires a directory delete command. Is there even one or do I have to do it another way? I really need to know. If you can help I'd appriciate it.


Jasmine
Administrator / Moderator

Apr 15, 2000, 7:14 AM

Post #2 of 3 (462 views)
Re: Directory Delete Command??? [In reply to] Can't Post

The command to delete a directory is

rmdir('directorytodelete');


Cure
User

Apr 15, 2000, 7:52 AM

Post #3 of 3 (462 views)
Re: Directory Delete Command??? [In reply to] Can't Post

Hi

To delete a directory with no contents in it.
$dir = 'cure'; #directory name is cure
rmdir $dir;

To delete a directory with contents in it.
$dir = 'cure'; #directory name is cure
$command=`rm -r $dir`;


Cure


[This message has been edited by Cure (edited 04-15-2000).]

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives