[EMAIL PROTECTED] wrote:

> Hi,
> 
> does someone know if it is possible to
> read a link-to-a-file ("Verknüpfung" in german)
> and find out where the real file is located to open
> it?

use strict;
use warnings;
use Win32::Shortcut;

my $sc = shift || 'test.lnk';
my $SC = new Win32::Shortcut ($sc) or die "new Shortcut: $! ($^E)";
my %show = (1 => 'Normal', 3 => 'Maximized');

# one of the first 3 methods should do it for you:

foreach (qw(Resolve Path ShortPath Arguments WorkingDirectory Description
  ShowCmd Hotkey IconLocation IconNumber Version)) {
        my $ret = $SC->$_();
        $ret = $show{$ret} if $_ eq 'ShowCmd';
        print "$_ => '", defined $ret ? $ret : '<undef>', "'\n";
}

__END__


-- 
  ,-/-  __      _  _         $Bill Luebkert    Mailto:[EMAIL PROTECTED]
 (_/   /  )    // //       DBE Collectibles    Mailto:[EMAIL PROTECTED]
  / ) /--<  o // //      Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_</_</_    http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to