Hello, I do get items in a list view that are checked to put in an array/hash/what ever. My code list the contents of a directory and puts them in a list view what I want is that after someone selects the files they want by checking the box next to it. They click on a button and it copies the selected file to a new location. Any ideas?
Thanks, Joe Here is my code: use Win32::GUI; $Window = new GUI::Window( -name => "Window", -text => "WEB Deploy v1.0.0", -width => 800, -height => 400, -left => 100, -top => 100, ); $Window->AddListView( -name => "ListView", -text => "hello world!", -left => 10, -top => 10, -width => 780, -height => 180, -style => WS_CHILD | WS_VISIBLE | 1, -fullrowselect => 1, -gridlines => 1, -checkboxes => 1, # -hottrack => 1, ); $width = $Window->ListView->ScaleWidth; $Window->ListView->InsertColumn( -index => 0, -width => $width/4, -text => "File", ); $Window->ListView->InsertColumn( -index => 1, -subitem => 1, -width => $width/1.33, -text => "Path", ); sub InsertListItem { my($name, $description) = @_; my $item = $Window->ListView->InsertItem( -item => $Window->ListView->Count(), -text => $name, # -index => $Window->ListView->Count(), ); $Window->ListView->SetItem( -item => $item, -subitem => 1, -text => $description, ); } $whereami = `chdir`; chomp($whereami); $dir = "L:\\Inetpub\\Timesheet"; push @dir,$dir; chomp($dir); while ($dirs=pop @dir){ chomp($dirs); chdir $dirs; while (<*>) { next if ($_ eq "."); next if ($_ eq ".."); if (-d $_) { next if (-l $_); print "\t Dir-> ",$_,"\n" if $DEBUG; push @dir,$dirs."/".$_; } else { InsertListItem($_, $dirs); print "\t File-> ",$_," => $size\n" if $DEBUG; } } exit if $DEBUG; chdir $whereami; } # $Window->ListView->TextColor(hex("0000FF")); $Window->Show(); $Window->Dialog();