What's the best strategy to delete a very huge folder using Perl?
Posted
by André Diniz
on Stack Overflow
See other posts from Stack Overflow
or by André Diniz
Published on 2010-04-02T16:58:17Z
Indexed on
2010/04/02
17:03 UTC
Read the original article
Hit count: 373
perl
|file-handling
Hi,
I need to delete all content (files and folders) under a given folder. The problems is: folder has millions of files and folders inside it. So I don't want to load all the file names in one go. Did you catch the issue?
Logic should like this:
- iterate a folder without load everything
- get a file or folder
- delete it
- go to the next one
Thanks for your help.
© Stack Overflow or respective owner