#! perl -slw use strict; use Win32::File qw[ GetAttributes ]; while( my $file = glob $ARGV[0] ) { GetAttributes( $file, my $attrs ); printf "%1s%1s%1s%1s%1s%1s%1s%1s%1s %s\n", ( $attrs & Win32::File::ARCHIVE() ) ? 'A' : ' ', ( $attrs & Win32::File::COMPRESSED()) ? 'C' : ' ', ( $attrs & Win32::File::DIRECTORY() ) ? 'D' : ' ', ( $attrs & Win32::File::HIDDEN() ) ? 'H' : ' ', ( $attrs & Win32::File::NORMAL() ) ? 'N' : ' ', ( $attrs & Win32::File::OFFLINE() ) ? 'O' : ' ', ( $attrs & Win32::File::READONLY() ) ? 'R' : ' ', ( $attrs & Win32::File::SYSTEM() ) ? 'S' : ' ', ( $attrs & Win32::File::TEMPORARY() ) ? 'T' : ' ', $file; } #### #! perl -slw use strict; use Win32::File; while( my $file = glob $ARGV[0] ) { Win32::File::GetAttributes( $file, my $attrs ); printf "%1s%1s%1s%1s%1s%1s%1s%1s%1s %s\n", ( $attrs & ARCHIVE ) ? 'A' : ' ', ( $attrs & COMPRESSED) ? 'C' : ' ', ( $attrs & DIRECTORY ) ? 'D' : ' ', ( $attrs & HIDDEN ) ? 'H' : ' ', ( $attrs & NORMAL ) ? 'N' : ' ', ( $attrs & OFFLINE ) ? 'O' : ' ', ( $attrs & READONLY ) ? 'R' : ' ', ( $attrs & SYSTEM ) ? 'S' : ' ', ( $attrs & TEMPORARY ) ? 'T' : ' ', $file; } #### #! perl -slw use strict; use Win32::File qw[ GetAttributes ARCHIVE COMPRESSED DIRECTORY HIDDEN NORMAL OFFLINE READONLY SYSTEM TEMPORARY ]; while( my $file = glob $ARGV[0] ) { GetAttributes( $file, my $attrs ); printf "%1s%1s%1s%1s%1s%1s%1s%1s%1s %s\n", ( $attrs & ARCHIVE ) ? 'A' : ' ', ( $attrs & COMPRESSED) ? 'C' : ' ', ( $attrs & DIRECTORY ) ? 'D' : ' ', ( $attrs & HIDDEN ) ? 'H' : ' ', ( $attrs & NORMAL ) ? 'N' : ' ', ( $attrs & OFFLINE ) ? 'O' : ' ', ( $attrs & READONLY ) ? 'R' : ' ', ( $attrs & SYSTEM ) ? 'S' : ' ', ( $attrs & TEMPORARY ) ? 'T' : ' ', $file; } #### #! perl -slw use strict; use Win32::File (); while( my $file = glob $ARGV[0] ) { Win32::File::GetAttributes( $file, my $attrs ); printf "%1s%1s%1s%1s%1s%1s%1s%1s%1s %s\n", ( $attrs & Win32::File::ARCHIVE() ) ? 'A' : ' ', ( $attrs & Win32::File::COMPRESSED()) ? 'C' : ' ', ( $attrs & Win32::File::DIRECTORY() ) ? 'D' : ' ', ( $attrs & Win32::File::HIDDEN() ) ? 'H' : ' ', ( $attrs & Win32::File::NORMAL() ) ? 'N' : ' ', ( $attrs & Win32::File::OFFLINE() ) ? 'O' : ' ', ( $attrs & Win32::File::READONLY() ) ? 'R' : ' ', ( $attrs & Win32::File::SYSTEM() ) ? 'S' : ' ', ( $attrs & Win32::File::TEMPORARY() ) ? 'T' : ' ', $file; }