http://www.perlmonks.org?node_id=348757

Nelly has asked for the wisdom of the Perl Monks concerning the following question:

Hi! I'm trying to move folder that include another folders and files. My actions are:
my $file2Copy = File::NCopy->new(recursive => 1); $file2Copy->copy($folder,$ArcFolder); rmtree($folder, 0, 0);
Every thing is good but it doesn't deletes the root folder that is already empty.
The error message I'm getting is:
Can't remove directory C:\125\Ba_hu\\update35: Permission denied
What is happening? rmtree has deleted everything inside this folder,
but can't delete the root folder that is empty.
I've tried to do:
rmdir $folder;
after rmtree and it's not deleting the folder any way, Please help!!!