#! 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; }