Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Keep It Simple, Stupid
 
PerlMonks  

Re: Recursive Directory Tree Deletion in Windows

by djw (Vicar)
on Oct 18, 2000 at 16:22 UTC ( [id://37347]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Recursive Directory Tree Deletion in Windows

Like the others said use File::Find::finddepth to recursively toast directories (obviously be very careful with this as it acts exactly like rm -r). If you have the perl cookbook there is an explination on page 325 of this exact thing.

If you don't have that then take a look at the code in the File:Find module (win32: %perl_install_dir%\lib\File\Find.pm ).

Also remember that the 'rmdir' command won't delete directories if they have files and/or subdirectories still in them.


Thanks,
djw
  • Comment on Re: Recursive Directory Tree Deletion in Windows

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://37347]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.