> From: Irfan Sayed <irfan_sayed2...@yahoo.com>
> To: Perl Beginners <beginners@perl.org>
> Sent: Friday, June 24, 2011 3:13 PM
> Subject: rmdir
> 
> hi,
> i need to delete some directories recursively which are present at some
> shared location
> 
> i tried file::path perl module but the issue with that module is , it
> is not deleting the root/parent dir
> 
> it deletes the subdirectories and all the files inside that but not
> removing root dir
> 
> here is my code:
>  $path = "\\\\build\\" . "f\$" .
> "\\Store\\build\\Internal_Builds\\Daily_Builds\\Daily\\zoc\\" .
> $hash_fin{$key};
> 
>  print "$path\n";
>  print "**********\n";
>   remove_tree($path,{verbose => 1,safe => 1,keep_root => 0});
> 
> now whaat i expect is , module shud delete the dir which is there in
> $path but it does not
> plz suggest
> 
> 
> regards
> Irfan

Since you have 'verbose' set, you should be seeing a message on the console
as each file is deleted.
You should see such a message for the 'root' directory.
Do you see such a message?
If you do, is there an error message being printed indicating there is a
problem removing the directory? Can you remove it manually (and what happens
if you can't)?
Don't be concerned with the read-only attribute being set on a directory in
Windows.
That attribute is ignored for directories.
There could be a permission problem, a file open in the folder, etc.
Also, post a complete working example when you post code. That may provide a
clue.
HTH,
Ken



--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to