in reply to Re: How to remove COMPRESSED attribute with Win32::File?
in thread How to remove COMPRESSED attribute with Win32::File?
Any ideas on what I am doing wrong? I can set and unset the attribute in Windows Explorer but with the Perl code compression remains on. Cheers, Timuse Win32::File; my $path="C:\\temp\\Perl\\TestFolder\\TestFile.txt"; my $attr; Win32::File::GetAttributes($path, $attr); if ($attr & COMPRESSED) { print "File is compressed. Now uncompress it!\n"; $attr &= ~COMPRESSED; Win32::File::SetAttributes($path, $attr); } else { print "File is not compressed. Nothing to do here.\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to remove COMPRESSED attribute with Win32::File?
by ikegami (Patriarch) on Mar 06, 2009 at 04:18 UTC | |
|
Re^3: How to remove COMPRESSED attribute with Win32::File?
by syphilis (Archbishop) on Mar 06, 2009 at 04:49 UTC |