![mac copy path of a directory shortcut mac copy path of a directory shortcut](https://149425180.v2.pressablecdn.com/wp-content/uploads/2020/06/automator-mac-os.jpg)
Here's a simple search/replace routine for you. Using your example, if you want to change /Volumes/E-TEST$/KaleidaScope2006/then you want to replace /Volumes/E-TEST$ with /Volumes/E$. You use applescript's text item delimiters. set the clipboard to «class ktxt» of ((the path_str as text) as record)end openon itemSort(my_list) set the index_list to repeat (the number of items in my_list) times set the low_item to "" repeat with i from 1 to (number of items in my_list) if i is not in the index_list then set this_item to item i of my_list if the low_item as text is "" then set the low_item to this_item set the low_item_index to i else if this_item as text comes before the low_item as text then set the low_item to this_item set the low_item_index to i end if end if end repeat set the end of sorted_list to the low_item set the end of the index_list to the low_item_index end repeat return the sorted_listend itemSort-Cole set shortened_path to do shell script " echo \"" & posix_path & "\" | sed 's|/Volumes||' " set path_str to path_str & shortened_path & return -set path_str to path_str & posix_path & return end repeat - Copy plain text to the clipboard. CBT 10/5/99 set path_str to "" as string repeat with i from 1 to the count of myItems set this_item to item i of myItems set posix_path to POSIX path of this_item - For now I'm stripping the preceding '/Volumes' string for external - drives so I don't clutter my build logs.
![mac copy path of a directory shortcut mac copy path of a directory shortcut](https://i.stack.imgur.com/fXkqH.png)
Just drop a few files/folders onto this droplet and their pathes will be copied and put on the clipboard.-CBT*)on open these_items set myItems to itemSort(these_items) - v1.0.5 ASCIIsort failed on older versions of applescript. Hello,Here's another applescript variation in the form of a droplet: (*I use this script to show people where to find files on our LAN.