in reply to Directory and file selection with PERL/Tk

Hi chanklaus, being neither a windoze or Tk person, I am not sure if there is any wisdom in this, but I found this script for retreiving the list of mapped drives in a windows box - maybe it will help you answer your "and/or"?

--------------------------------------------------------------- # Adapted from VBScript code contained in the book: # "Windows Server Cookbook" by Robbie Allen # ISBN: 0-596-00633-0 # --------------------------------------------------------------- use Win32::OLE qw(in); $Win32::OLE::Warn = 3; $strComputer = '.'; $objWMI = Win32::OLE->GetObject('winmgmts:\\\\' . $strComputer . '\\ro +ot\\cimv2'); $colDrives = $objWMI->ExecQuery('select * from Win32_MappedLogicalDisk +'); print "Mapped Drives:\n"; foreach my $objDrive (in $colDrives) { print ' Device ID: ' . $objDrive->DeviceID, "\n"; print ' Volume Name: ' . $objDrive->VolumeName, "\n"; print ' Session ID: ' . $objDrive->SessionID, "\n"; print ' Size: ' . $objDrive->Size, "\n"; print "\n"; }

Although what you want to do sounds like it should be a common enough task that there would exist somewhere a more elegant ( and tested ) solution like you wanted!

Just a something something...