use Tk; use strict; use Tk::Text; use Tk::Frame; use File::Find; use Tk::Scrollbar; use Tk::Adjuster; use Win32::Perms; my $path = shift @ARGV; my $mw = new MainWindow; $mw->geometry('500x400'); my $left_frame = $mw->Frame; my $adjuster = $mw->Adjuster(-widget=> $left_frame, -side=>'left'); my $right_frame = $mw->Frame; my %dirs; find(sub { $dirs{$File::Find::dir}++;}, $path); my ($list_box) = $left_frame->Scrolled('Listbox', -height=>'0', -width=>'0', -scrollbars=>'e', ); my ($output_text) = $right_frame->Scrolled('Text', -height=>'1', -width=>'1', -scrollbars=>'osoe',); $list_box->insert('end', sort keys %dirs); $list_box->bind('',sub {get_perms();}); $left_frame->pack(qw/-side left -fill y/); $adjuster->pack(qw/-side left -fill y/); $right_frame->pack(qw/-side right -fill both -expand 1/); $list_box->pack(qw/-side left -fill both -expand 1/); $output_text->pack(qw/-side bottom -fill both -expand 1/); MainLoop; exit 0; sub get_perms { my ($indx) = $list_box->curselection(); my $path = $list_box->get($indx); my $perms = new Win32::Perms($path) || die "\n$^E\n"; print "Path: " . $perms->Path(); my $counter = $perms->Get(\ my @list); $output_text->delete('0.1','end'); foreach my $item (@list) { while (my ($field, $value) = each %$item) { next if ($field !~ /account|access/i ); $output_text->insert('end', $field.": ".$value.",\t"); } $output_text->insert('end',"\n"); } }