It's a bit inelegant to blow away the whole directory and then re-create it,
but it can be done in Perl.  Take a look at 'rmtree in the File::Path
module.

Scott



----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 01, 2001 5:33 AM
Subject: Deleting the content of a directory


> Hi,
> I really need some help to delete all the content of a directory.
> I thought about deleting the directory and then create it again right
after
> the process with rmdir and mkdir...but it seems impossible as the
directory
> is not empty.
> How can I write unlink (every file) ? I tried *.* but it doesn't work.
> Thanks a lot in advance.
>
> Fabien
> _______________________________________________
> ActivePerl mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/activeperl
>

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activeperl

Reply via email to