Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'One way to share links to networked files' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
One way to share links to networked files
Authored by: dayhox on Mar 25, '09 11:28:30AM

Here is a script I created for a client. It gets the file/directory location of a dropped on item and copy's the location to your clipboard/pasteboard.

If you'd rather download a precompiled script you can get it on my website (the cobbler has no shoes)

[link:]http://www.solutionarts.net/freebies/loco.zip

Make yer own(please give credit to code used to SolutionArts)-->

Make a droplet (AppleScript Application)
open Script Editor and paste in this -->

on open theItem
set fileName to POSIX path of theItem
set the clipboard to fileName
end open

on run
display dialog "Drop files and folders on this icon to get the location of the file."
end run

--> Save the file as an application

You can alternatively display the location by calling

display dialog "Copy the field text, then paste:" & return & "The file is located at: " default answer "" & return & fileName & return buttons {"Done"}

in the script above, replacing

set the clipboard to fileName

Hope ya like it.
d



[ Reply to This | # ]