in reply to rmtree deletes everything inside the folder but doesn't deletes the root folder him self

You could maybe replace your rmtree() command by:

'rm -rf $folder'

Just my 2 cents...
  • Comment on Re: rmtree deletes everything inside the folder but doesn't deletes the root folder him self
  • Download Code

Replies are listed 'Best First'.
Re: Re: rmtree deletes everything inside the folder but doesn't deletes the root folder him self
by Nelly (Novice) on Apr 29, 2004 at 10:14 UTC
    Thanks for replying, I've tried to follow your suggestion,and I've recieved error:
    Useless use of subtraction (-) in void context at C:\Perl\ArcUpdFdr.pl line 64.
    Bareword "rm" not allowed while "strict subs" in use at C:\Perl\ArcUpdFdr.pl line 64.
    Can you tell me, how can I use this function, I couldn't find the help on it. Tnanks!
      that's not a bare word. put it in backticks! `rm -rf /dir/`;