how to unset the read-only attribute using win32::file module there r i guess only two methods
1: Getattributes 2: setattributes but the attribute which is already set, how to unset that ?? ________________________________ From: Rob Coops <rco...@gmail.com> To: Irfan Sayed <irfan_sayed2...@yahoo.com> Cc: Shawn H Corey <shawnhco...@gmail.com>; "beginners@perl.org" <beginners@perl.org> Sent: Monday, June 27, 2011 7:22 PM Subject: Re: rmdir On Mon, Jun 27, 2011 at 3:49 PM, Irfan Sayed <irfan_sayed2...@yahoo.com> wrote: exactly. some of the files have set the attribute as read only > >and due to that module was unable to delete those > >is there any module which will check if the file has read only attribute and >if yes remove that attribute?? > >plz suggest > >--irfan > > > >________________________________ >From: Shawn H Corey <shawnhco...@gmail.com> >To: beginners@perl.org >Sent: Monday, June 27, 2011 6:09 PM >Subject: Re: rmdir > > >On 11-06-27 08:29 AM, Irfan Sayed wrote: >> even i tried windows del command >> but it prompts for confirmation to delete the files >> do u know how to suppress these prompts ? i did not find any switch which >> allows you to suppress >> > >It sounds like some of the files or directories have their read-only bit set. > >What is the output of this: > >use File::Path; >my $errors = []; >rmtree( $dir, { error => \$errors }); >print "$_\n" for @$errors; > >BTW, I do believe the correct Windows command is: del /s > > >-- Just my 0.00000002 million dollars worth, > Shawn > >Confusion is the first step of understanding. > >Programming is as much about organization and communication >as it is about coding. > >The secret to great software: Fail early & often. > >Eliminate software piracy: use only FLOSS. > >-- To unsubscribe, e-mail: beginners-unsubscr...@perl.org >For additional commands, e-mail: beginners-h...@perl.org >http://learn.perl.org/ Have a look at the following: Win32::File (to get and set file attributes on Windows)