For Windows, I should think you could just test for testalias empty? If it had a path in it at all, that would indicate that somefile was an alias.
Linux I can't check. Martin David Bovill wrote: > How about: > > function file_IsAlias someFile > put the aliasreference of someFile into testAlias > return someFile is not testAlias or testAlias is empty > end file_IsAlias > > Any problems with that - how does it work on Linux? > > > 2008/5/5 Martin Baxter <[EMAIL PROTECTED]>: > >> David Bovill wrote: >>> I guess this works? Can someone test it on windows? >>> >>> function file_IsAlias someFile >>>> put the aliasreference of someFile into testAlias >>>> return someFile is not testAlias >>>> end file_IsAlias >>>> >>> 2008/5/5 David Bovill <[EMAIL PROTECTED]>: >>> >>>> Is there a way to find out if a file is an alias. The only way I can do >> it >>>> at the moment is with MacOS specific hacks? >>>> >> If the file in question is *not* an alias (aka a shortcut on Windows) >> the aliasreference returns empty here on XP. So I would expect the above >> function to always report that someFile <> testAlias, Regardless of >> whether it was one or not. >> >> On Windows, shortcuts have the file extension ".lnk", perhaps all you >> need to do is check for that? >> >> A quick test shows this works on my system: >> >> answer file "whatever" >> put it into vv >> if vv is not empty then >> set itemdelimiter to "." >> if last item of vv = "lnk" then >> put "Is a shortcut" >> else >> put "is not a shortcut" >> end if >> end if >> >> Martin Baxter -- I am Not a Number, I am a free NaN _______________________________________________ use-revolution mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
