Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FSO (File System Object) & Shortcuts

Status
Not open for further replies.

Tiglet

Technical User
Apr 12, 2002
94
0
0
GB
I have some code which effectively replicates the functionality of the Search function within Windows. However, when I am searching for files and it picks up a shortcut, it is capturing the attributes of the file that the shortcut points to rather than the shortcut itself. I have looked at the alias attribute within the FSO but it returns the value of 32 i.e. Read/Write changed since last back up - How do I distinguish between genuine files and shortcuts

Thanks in advance

Tiglet [reading]

Living on Earth is expensive, but it does include a free trip around the sun every year
 
The name of a shortcut ends with .lnk I guess, doesn't it ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Yep, unfortunately, I've tried retrieving only *.lnk files but the FSO then retrieves the attributes of where the shortcut points to. This is really bugging me :-(



Tiglet [reading]

Living on Earth is expensive, but it does include a free trip around the sun every year
 
You may be able to use the WMI Win32_ShortcutFile class to your advantage for this as well.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Okay, thanks guys, I'll have a look & let you know how I get on

Cheers

Tiglet [reading]

Living on Earth is expensive, but it does include a free trip around the sun every year
 
After a little more digging, apparently it's a "bug" in the FSO where it returns the attributes of the target file rather than the shortcut so a different approach is definitely needed.

Thanks for all the suggestions

Tiglet [reading]

Living on Earth is expensive, but it does include a free trip around the sun every year
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top