Using AppleScript/Automator to get file path and create AFP hyperlink

Hi All,
A colleague has asked for a service (contextual menu item in Finder) to get a selected item's remote (afp://) file path and copy it to the clipboard...  Pretty sure I've got that part down. 
What I need advice on is how to make the resulting pasted file path into a serviceable hyperlink.  AFP keeps telling me there was an error connection to the server....  Does the copied path have to include mounting commands and user credentials for this to work??
Thanks,
Nathan

Hi Richard - here's the script:
tell application "Finder"
          set sel to the selection as text
          set TempTID to AppleScript's text item delimiters
          set AppleScript's text item delimiters to space
          set sel to text items of sel
          set AppleScript's text item delimiters to "%20"
          set sel to sel as string
          set AppleScript's text item delimiters to TempTID
set the clipboard to "file://" & POSIX path of sel
end tell

Similar Messages

  • File dialog box: how get full path and filename (firefox 3.0 problem)

    Hi,
    I have a smilar problem then discussed in this thread: file dialog box: how get  full path and filename
    Now this solution doesn't seem to work in firefox 3.0,I only get the filename but not the full path.
    I have tried to solve this problem by adding *"netscape.security.PrivilegeManager.enablePrivilege("UniversalFileRead");"* in a javacript function but that doesn't do the trick
    Although when i tested it local it does work.
    Any idees how to solve this?
    Best Regards
    Stijn

    Actually, that is strange and scarry. With 20% of the browser market share they decide to behave like Microsoft did in the past - they want to decide what users need and what they do not need. With 3.0 I have a real problem with some of my applications. They are all tested in IE6, IE7, FF2.0 and they all work the same way (they even work with Opera and Safari). Now, I will for sure not go there and make it work for 3.0, just because 2 out of 200 users use FF3.0. Up to now I have always recomended FF as the best browser. 3.0 causes my opinion to change completely. Competition is always good but it is a question if it is good if we have 20 different browsers out there with equal market shares.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Get (variable) file path and name in a text element

    How do you get the (variable) file path and name in a text element (label) in LCD? If you save the PDF and afterwards relocate it, it should update the values. Is that actually possible?

    Does anyone have any advice on this issue?
    Thanks in advance,
    Zack H.

  • Should i use pipeline in order to get data from file path to create metadata?

    Hi,
    we use sharepoint 2013 to index file share and the folders structure represents data as project name / subject etc.
    Do you reccomend use pipeline capabilities in order to create metadata from those folders name? (so we will be able to use it as refiners later).
    In case so - how to do it?
    thanks
    keren tsur

    Hi  Keren,
    According to your description, my understanding is that you want to convert folder structure to SharePoint metadata.
    For achieving your demand, you can use the tool in codeplex:
    Folders To SharePoint Metadata Migrator (Folders2SP)
    Also you can have a look at the blog:
    http://en.community.dell.com/techcenter/sharepoint-for-all/w/wiki/5443.converting-folder-structure-to-sharepoint-metadata.aspx
    http://stackoverflow.com/questions/22411014/sharepoint-script-to-automatically-import-documents-from-a-network-share-on-a-r
    http://en.share-gate.com/blog/map-folder-names-to-sharepoint-metadata
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • "File Path and Name" field not displaying correctly

    Post Author: DaveWoo
    CA Forum: General
    Hello,Here's my situation: I'm currently upgrading from Crystal Reports for Visual Studio .NET 2003 to Crystal Reports for Visual Studio 2005. I have several reports (programmatically generated using VB.NET) that use the "File Path and Name" special field. Now, in the old version of Crystal Reports (2003), the field properly displayed the original file path and name; however, in the new version (2005), the field displays as "C:\DOCUME1\Username\LOCALS1\Temp\Filename{F2459406-3719-4C8B-917C-4A7055A18C76}.tmp" - in other words, the location of the temporary .rpt file.How do I get the "File Path and Name" field to correctly display the path & name of the original file, like it did in the prior version?- Dave

    This is a known issue tracked under ADAPT0000962216. At this time I do not know when this will be resolved, however Service Pack 2 for CR 2008 is targeted to be released by September and this may contain the fix.
    Ludek

  • What is the correct way to format file paths and names in the structapp file?

    I am trying to create a structured application to export fm files as xml, and probably read the xml back to fm.
    In the structured application file (structapp), I need to specify the locations of the various files (DTD, read/write, template, etc). I would like to place these files on a shared server so others can use the same structapp file (that is, a cop of it). What is the correct way to format the file paths and names? Can folders folder names and file names have spaces in them? I tried the following, for example:
    \\serverName\shareName\folder 1\folder 2\file name.dtd
    I use the same format for the template file and the read/write rules file.
    When I try to save an fm file to xml, FrameMaker says that it cannot read the DTD; however, the resulting xml file appears to be well-formed. The DOCTYPE element in the resulting xml is formatted with forward slashes and spaces replaced with %20.
    I tried using forward slashes and replacing spaces with %20, but then I get an error about reading the read/write rules.
    NOTE: I have another structured application to read xml into fm. This application does not have a DTD file. The template and read/write rules files are specified as above. Except for complaining about a lack of a DTD, the application works fine; it even applies an XSLT in the process. Again, when I DO add a DTD to this latter application, I get the same complaint about not being able to read the DTD.
    I am using fully patched FrameMaker 9 in Windows XP.
    Thanks,
    Van

    Hi Van,
    The XML parser and FrameMaker are not the same thing. The Error Log says which component created which message. The XSL processor is another option that can throw messages. The "\\server\path\some.dtd" syntax in structapps.fm seems to be fine for some tools, as Internet Explorer with XML tools successfully finds the DTD which appears as "//server/path/some.dtd" in the XML. But apparently Xerxes, the XML parser bundled with FrameMaker, does not like this notation.
    If you have a path with a drive letter, "H:\path\some.dtd", FrameMaker turns that into "file:///H:/path/some.dtd". It seems, Xerces would like to see "file:/" in front of absolute paths.
    This is what I have in structapps.fm:
    Template: \\server\path\projecttemplate.fm
    DTD: some.dtd
    Read/write rules: \\server\path\projectrules.txt
    DOCTYPE: …
    Entity locations
      Entity search paths
        1: \\server\path\
    In the structapps.fm I have the DTD without path information. The resulting XML (without XSL postprocessing) then contains just the file name with a relative path back to the book folder (when saving a book as XML). It therefore requires the DTD to be available at this place. I handle this using an event script that fires for NotePreSaveXml and copies the DTD to the folder of the original document.
    As I always use XSL postprocessing and using XSLT1 it is not possible to have the doctype-system as a parameter I have this in my XSL stylesheet:
    <xsl:output doctype-system="some.dtd" />
    For the resulting XML the DTD is expected to be in the same folder as the XML file. This is handled by the same event script as above, it therefore copies the DTD to the source and the target folder.
    Bottom line: If you want/have to use UNC paths, you have to do some programming to work around a FrameMaker bug.
    - Michael

  • File Path and Name field does not display correct path

    We are using Crystal 2008 along with VS 2005. We embed the special "File Path and Name" field  inside our report and it displays the correct path when viewed inside Crystal reports:
    C:\Program Files\reports\Chart.rpt
    When run through the web and viewed in the DHTML viewer, the file name and path appear as follows:
    C:\Windows\TEMP\Chart {02152A43-3339-4C03-A50A-E281E1D391AF}.rpt
    How can this be corrected?
    Thanks in advance for any assistance.

    This is a known issue tracked under ADAPT0000962216. At this time I do not know when this will be resolved, however Service Pack 2 for CR 2008 is targeted to be released by September and this may contain the fix.
    Ludek

  • How do I use Migration Assistant to get my Mail and Keychain settings from

    How do I use Migration Assistant to get my Mail and Keychain settings from my Power Mac G5 2.3Ghz? I just purchased a new 2.5 MacBook Pro which will be delivered tomorrow, and I want to to know how to transfer Mail and Keychain?
    Thank You in advance for your reading and replying.
    Kindest Regards,
    Sebastian

    Rather than using Migration Assistant, which can cause trouble with the PPC to Intel change, simply boot the G5 in FireWire target disk mode and manually transfer the following:
    /Home/Library/Keychains (copy the whole folder)
    /Home/Library/Mail (copy the whole folder)
    /Home/Library/Preferences/com.apple.mail.plist
    You might want to look over Kappy's helpful guide for migrating, which covers the full process for a manual migration (including the above files).
    Hope this helps...

  • How do I select multiple files under "Get File Info"and lock or unlock all?

    How do I select multiple files under "Get File Info"and lock or unlock them all? It seems to do it automatically when I have 10 or more selected. But how do I lock or unlock 5 or 6 files in one swoop? Thanks

    Select the desired files then press OPTION and select Show Inspector from the Finder's File menu.
    Why reward points?(Quoted from Discussions Terms of Use.)
    The reward system helps to increase community participation. When a community member gives you (or another member) a reward for providing helpful advice or a solution to their question, your accumulated points will increase your status level within the community.
    Members may reward you with 5 points if they deem that your reply is helpful and 10 points if you post a solution to their issue. Likewise, when you mark a reply as Helpful or Solved in your own created topic, you will be awarding the respondent with the same point values.

  • How to get file path?

    Hi all,
    I have a tcode ysd_gr. When I execute it, it has one select option & I entered the values as *.csv. It gave 6 csv files(only file names) & I want to retreive data from one file.
    So I need to find the file path. The functional consultants told that the files are in Application server (there are more than 5 application servers are used here).
    So I need to know how to find the file path  and in which application server the file is placed.
    Thanks in advance,
    Vijay.

    Go to t-code AL11 and give the path name excluding the file name:
    I mean for example the name is as below:
    D:\usr\sap\IDS\DVEBMGS00\data\test.csv
    here test.csv is the file name.
    So go to AL11 and give upto D:\usr\sap\IDS\DVEBMGS00\data and dauble click on it and search for the file name.
    Hope this will solve your problem.
    Reward if helpful.
    Thank you.

  • I have a new mac book pro System Version: OS X 10.9.4 just one week old. When i play games using chrome the mac gets super hot and in the middle and the bottom. I had to return a mac last week because of this and got a new one replaced. But it still

    I have a new mac book pro System Version: OS X 10.9.4 just one week old. When i play games using chrome the mac gets super hot and in the middle and the bottom. I had to return a mac last week because of this and got a new one replaced. But it still

    I ran the diagnostics suggested in Macbook Pro Running Slow and Overheating, High kernel_task CPU Usage. Results below. Any help would be great.
    System Version: OS X 10.9.4 (13E28) 
    Kernel Version: Darwin 13.3.0
    Boot Mode: Normal
    Model: MacBookPro11,1
    USB
       Dell USB Optical Mouse (Dell Inc.)
    System diagnostics
       2014-09-20 PluginProcess spin
       2014-09-20 PluginProcess spin
       2014-09-20 iTunes spin
       2014-09-22 PluginProcess spin
       2014-09-22 PluginProcess spin
       2014-09-25 PluginProcess spin
       2014-09-26 Google Chrome spin
       2014-09-26 Google Chrome spin
    User diagnostics
       2014-09-20 CalendarAgent crash
       2014-09-22 DashboardClient crash
    Kernel messages
       Sep 26 17:21:23   IOPPF: Sent gpu-internal-plimit-notification last value 4 (rounded time weighted average 4)
       Sep 26 17:21:35   IOPPF: Sent cpu-plimit-notification last value 5 (rounded time weighted average 5)
       Sep 26 17:21:35   IOPPF: Sent gpu-internal-single-slice-plimit-notification last value 3 (rounded time weighted average 3)
       Sep 26 17:21:35   IOPPF: Sent gpu-internal-plimit-notification last value 3 (rounded time weighted average 3)
       Sep 26 17:21:47   IOPPF: Sent cpu-plimit-notification last value 8 (rounded time weighted average 7)
       Sep 26 17:21:47   IOPPF: Sent gpu-internal-single-slice-plimit-notification last value 3 (rounded time weighted average 3)
       Sep 26 17:21:47   IOPPF: Sent gpu-internal-plimit-notification last value 3 (rounded time weighted average 3)
       Sep 26 17:22:01   IOPPF: Sent cpu-plimit-notification last value 5 (rounded time weighted average 7)
       Sep 26 17:22:01   IOPPF: Sent gpu-internal-single-slice-plimit-notification last value 2 (rounded time weighted average 3)
       Sep 26 17:22:01   IOPPF: Sent gpu-internal-plimit-notification last value 2 (rounded time weighted average 3)
       Sep 26 17:22:21   IOPPF: Sent cpu-plimit-notification last value 10 (rounded time weighted average 9)
       Sep 26 17:22:21   IOPPF: Sent gpu-internal-single-slice-plimit-notification last value 4 (rounded time weighted average 3)
       Sep 26 17:22:21   IOPPF: Sent gpu-internal-plimit-notification last value 4 (rounded time weighted average 3)
       Sep 26 17:22:34   IOPPF: Sent cpu-plimit-notification last value 8 (rounded time weighted average 8)
       Sep 26 17:22:34   IOPPF: Sent gpu-internal-single-slice-plimit-notification last value 5 (rounded time weighted average 5)
       Sep 26 17:22:34   IOPPF: Sent gpu-internal-plimit-notification last value 5 (rounded time weighted average 5)
       Sep 26 17:22:47   IOPPF: Sent cpu-plimit-notification last value 6 (rounded time weighted average 6)
       Sep 26 17:22:47   IOPPF: Sent gpu-internal-single-slice-plimit-notification last value 5 (rounded time weighted average 5)
       Sep 26 17:22:47   IOPPF: Sent gpu-internal-plimit-notification last value 5 (rounded time weighted average 5)
       Sep 26 17:23:01   IOPPF: Sent cpu-plimit-notification last value 7 (rounded time weighted average 7)
       Sep 26 17:23:01   IOPPF: Sent gpu-internal-single-slice-plimit-notification last value 5 (rounded time weighted average 5)
       Sep 26 17:23:01   IOPPF: Sent gpu-internal-plimit-notification last value 5 (rounded time weighted average 5)
       Sep 26 17:23:12   IOPPF: Sent cpu-plimit-notification last value 6 (rounded time weighted average 6)
       Sep 26 17:23:12   IOPPF: Sent gpu-internal-single-slice-plimit-notification last value 5 (rounded time weighted average 5)
       Sep 26 17:23:12   IOPPF: Sent gpu-internal-plimit-notification last value 5 (rounded time weighted average 5)
    Extrinsic daemons
       com.adobe.fpsaud
    Extrinsic agents
       com.google.keystone.user.agent
    launchd items
       /Library/LaunchDaemons/com.adobe.fpsaud.plist
        (com.adobe.fpsaud)
       Library/LaunchAgents/com.apple.FolderActions.enabled.plist
        (com.apple.FolderActions.enabled)
       Library/LaunchAgents/com.apple.FolderActions.folders.plist
        (com.apple.FolderActions.folders)
       Library/LaunchAgents/com.google.keystone.agent.plist
        (com.google.keystone.user.agent)
    Startup items
       /Library/StartupItems/TuxeraNTFSUnmountHelper/TuxeraNTFSUnmountHelper
    Extrinsic loadable bundles
       /Library/Internet Plug-Ins/Flash Player.plugin
        (com.macromedia.Flash Player.plugin)
       /Library/PreferencePanes/Flash Player.prefPane
        (com.adobe.flashplayerpreferences)
       /Library/PreferencePanes/Tuxera NTFS.prefPane
        (com.tuxera.ntfs.mac.prefpane)
       Library/Address Book Plug-Ins/SkypeABDialer.bundle
        (com.skype.skypeabdialer)
       Library/Address Book Plug-Ins/SkypeABSMS.bundle
        (com.skype.skypeabsms)
    User login items
       iTunesHelper
       Google Chrome
    Restricted user files: 45
    Elapsed time (s): 75

  • Pg Number, File path and date automatically printed?

    Is there a way to automatically print the page number, complete file path and date at bottom of each  page (set to landscape)?
    Thanks!

    Thanks Carlos,
    It looks like the work72a would work if we were using macs, but we're not...
    And there is NO WAY my boss will pay $999 for the other one, even if it did work.
    So, now I'm open to other suggestions. We have hundreds of clients that we do work for, and our jobs are organized in folders for each client. A lot of clients with the same name but different locations (ie., Fox Meadow OH, Fox Meadow TX), and each has a different folder. The files are named by dept and year (ie., 2012 Glass, 2012 Art). We often access old files (which, there are thousands of, because they have been organized this way for years.) We need to have the client folder on the page along with the file name (hence the file path).
    The script that Carlos created is great, but there are too many steps. Open the script, change location and select info to be displayed (3 steps), close script. There are days we access 50 jobs and the script just added 5 plus steps to each job.
    Is there a way to use a hot key run a script that will place the info when and where we need it and auto close the script? Or is there a way to display the full path (in the Illustrator tab?) where we can see which folder the file is in and we will manually type the folder? Or does anyone have another suggestion?

  • Max length of VI file paths and file names

    Hi,
    Is there a maximum allowed length of VI file paths and file names in LabVIEW? I'm running LV 6.0.2i on NT and is trying to save a VI inside a LLB and LabVIEW crashes each time. I have also tried to copy the VI from the LLB to a temp folder with the Librarian VI, but LabVIEW crashes as well. The total length of the file path is around 260 characters and I strongly suspect the file path length in combination with LLB because when I use a shorter path the problem disappear. If I use a long path without LLB (just regular VIs) a warning appear "Invalid file name" instead of LabVIEW crashing.
    Does anybody know the solution to this problem or must I use shorter filepaths? Perhaps it depends on which platform I am running
    LV on?
    Sincerely,
    Mattias Ericsson

    "Mattias Ericsson" wrote in message
    news:[email protected]..
    > Hi,
    >
    > Is there a maximum allowed length of VI file paths and file names in
    > LabVIEW? I'm running LV 6.0.2i on NT and is trying to save a VI inside
    > a LLB and LabVIEW crashes each time. I have also tried to copy the VI
    > from the LLB to a temp folder with the Librarian VI, but LabVIEW
    > crashes as well. The total length of the file path is around 260
    > characters and I strongly suspect the file path length in combination
    > with LLB because when I use a shorter path the problem disappear. If I
    > use a long path without LLB (just regular VIs) a warning appear
    > "Invalid file name" instead of LabVIEW crashing.
    >
    > Does anybody know the solution to
    this problem or must I use shorter
    > filepaths? Perhaps it depends on which platform I am running LV on?
    I believe windows has a 255 character pathname (file+path) limit. We once
    had that problem because we had a long filename and a longer pathname.
    Moved the directory up a couple levels and problem solved.

  • Specify the output file path and print name when printing pages

    hi,
    how can i Specify the output pdf file path and print name when i am using the function PrintPagesSilent from AcroAVDoc Object.
    My Code :-
    Acrobat.AcroAVDoc doc = new Acrobat.AcroAVDoc();doc.Open(path,
    "temp");

    Dear Irosenth,
    i try with different format (doc, docx,  xls, jpg, bmp and txt) and it working successfully, but it give an random name for the file which saved in default folder for Adobe PDF print.
    you can use the following function:
    private void PrintPDF(string[] inputfilepath){
    foreach (string path in inputfilepath){
    Acrobat.
    AcroAVDoc doc = new Acrobat.AcroAVDoc();doc.Open(path,
    "temp"); 
    Boolean v = doc.PrintPagesSilent(0, ((Acrobat.AcroPDDoc)(doc.GetPDDoc())).GetNumPages() - 1, 0, 0, 1);doc.Close(1);
    and calling it by the following code:
    PrintPDF(System.IO.Directory.GetFiles("c:\\t\\printjob"));
    copy all files that you want to convert in side the mentioned path and run it program, then check the defualt print path for Adobe PDF printer.
    test it and reply me. thanks again

  • Error code -43 - unable to get file path when burning DVD

    I just installed Tiger on my son's iMac 500. Borrowed a Lacie DVD r/w and tried to burn the contents of a user folder to a DVD-R. It burned part of it, but failed with the following error:
    The operation can not be completed because one or more
    required items an not be found. (Error coed -43).
    Could not open the dat fork of "<unable to get file path>" (-43).
    I was able to burn a CD on the drive, but that was for another user directory that fit on a CD-R. The folder I was trying to burn to the DVD was about 1.1 G.
    Thanks,
    Alfredo

    I just installed Tiger on my son's iMac 500. Borrowed a Lacie DVD r/w and tried to burn the contents of a user folder to a DVD-R. It burned part of it, but failed with the following error:
    The operation can not be completed because one or more
    required items an not be found. (Error coed -43).
    Could not open the dat fork of "<unable to get file path>" (-43).
    I was able to burn a CD on the drive, but that was for another user directory that fit on a CD-R. The folder I was trying to burn to the DVD was about 1.1 G.
    Thanks,
    Alfredo

Maybe you are looking for

  • How can I print my A4 Book now in 8"x10.5"? RESIZE?

    Hello I have a book about 700 Pages already been printed a couple of times in A4 size, Now the sponsor can only print it in max 8"x10.5" This means the entire Book/file needs to be adjusted to this new size  in order to get it printed. I need to know

  • Can't see friend on iChat video?

    My friend and I both have new macs, and she is in the northern woods of Wisconsin, but she has internet, and we can connect with video chat, but I can't see her. She can see me though. All I see is myself? Any reason why that would be?

  • Windows media player does not play all videos

    This laptop s a HP G71-340US model... Before it played all of my music and video files but lately it began giving me te error message... windows media player encountered an error when opening this file. It still plays quick time and mpg files but avi

  • Can't open one PDF

    I have downloaded the free adobe reader, One of the five PDF files will not open.  Can I purchase the upgrade. It is for my personal home use only.

  • Can I enable and disable the system speaker under program control

    Can I enable and disable the system speaker under program control? I'm using LabVIEW 2010. The PC is running Windows XP Pro. Thank you