Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: tracing symlinks

by Cybercosis (Monk)
on May 08, 2001 at 19:23 UTC ( #78861=note: print w/replies, xml ) Need Help??


in reply to tracing symlinks

WELL... I'd go with readlink() on *NIX systems, but if it MUST run on windows and cope with windows links, then if you open the .lnk file, there should be a complete path to whatever you're looking in about 200-300 bytes in. If you just snarf the whole file (it's a links, it shouldn't be all that big) and then regex the bugger (UNTESTED!):
$file =~ /([list|of|acceptable|drive|letters]\:.+)/

That ought to (sorta) work.

~Cybercosis

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://78861]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2022-11-29 04:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?