Win32::File::GetAttributes($path, $attr); if ($attr & COMPRESSED) { print "File is compressed\n"; # Here I will remove the compressed attribute, but how? }