RayRay459 has asked for the wisdom of the Perl Monks concerning the following question:
use Win32::FileSecurity; use File::stat qw(:FIELDS); print "enter in a file to get info on: "; chomp($InFile = <STDIN>); if (Win32::FileSecurity::Get($InFile, \%Perms)) { print "Permissions for $InFile:\n"; foreach $Account (sort( keys( %Perms))) { print "\t$Account:\n"; if (Win32::FileSecurity::EnumerateRights( $Perms{$Account}, \@ +List)) { map {print "\t$_\n";} (@List); } else { print "\t\tNone\n"; } } } else { print "Error accessing permissions for $InFile:\n"; print "Win32::FormatMessage( Win32::GetLastError() )"; } $stat = stat($InFile) or die "No File :$!"; if ($st_size & $st_mtime) { print "\n" . $st_size; print "\n" . $st_mtime; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: comparing the same directory on two different machines Win32
by Moonie (Friar) on Feb 07, 2002 at 22:13 UTC | |
|
Re: comparing the same directory on two different machines Win32
by perrin (Chancellor) on Feb 07, 2002 at 19:58 UTC |