use Win32::File; my $path = $ARGV[0]; if (Win32::File::GetAttributes($path, $attrib)) { print $attrib, $/; } else { print "Error\n"; }