lasasindian.blogg.se

Mac copy path to terminal
Mac copy path to terminal







mac copy path to terminal
  1. #Mac copy path to terminal mac os x#
  2. #Mac copy path to terminal code#
  3. #Mac copy path to terminal mac#

Figured I’d post this for posterity and in case any of you are wishing your mac could do this too.An example script that (should) create. It’s one thing I love about computers, and I guess life in general, where there’s a will there’s usually a way (especially when forums are involved). I’m still yet to create a shortcut that will make it the fastest, but this is a big step in the right direction. Set the end of the index_list to the low_item_indexĪlso I was able to use automator to create a context menu item – although I prefer the droplet since I don’t have to fool with the accuracy required to navigate through nested context menu items. Set the end of sorted_list to the low_item Repeat with i from 1 to (number of items in my_list)Įlse if this_item as text comes before the low_item as text then Repeat (the number of items in my_list) times Set the clipboard to «class ktxt» of ((the path_str as text) as record) –set path_str to path_str & posix_path & return Set path_str to path_str & shortened_path & return drives so I don’t clutter my build logs.Įcho \”” & posix_path & “\” | sed ‘s|/Volumes||’ For now I’m stripping the preceding ‘/Volumes’ string for external Set posix_path to POSIX path of this_item Repeat with i from 1 to the count of myItems Set myItems to itemSort(these_items) - v1.0.5 ASCIIsort failed on older versions of applescript. Just drop a few files/folders onto this droplet and their pathes will be copied and put on the clipboard.

mac copy path to terminal

I use this script to show people where to find files on our LAN.

#Mac copy path to terminal code#

I created a droplet with applescript to copy a files path to my clipboard (code below) and then put it into my dock for easy access! Create your own “Copy Path” droplet with this code or download mine here Thanks to this great forum post I was able to find what I needed! I want to either set up a shortcut so I can select the file and hit a couple keys and have the path copied to my clipboard or have a droplet in my dock to drop a file into which will copy the file’s path to my clipboard and then I can easily paste the file path into an email in a matter of seconds and trust that they will be able to navigate to the correct file. I thought about venturing into apple script, a realm I’ve heard a bit about but never ventured alone.Īfter some initial tuts and intros to applescript it seems like a very feasible task. Awesome, but not very useful for me, it is rare that I have a terminal window open and the process is a bit lengthy since my main drive for this is to save time (and typos) from having to type the path myself of take a screen shot of the path in either the finder or the get info window. Then I read somewhere that you could open a terminal window and drop a file into it, then the path to the file would be printed in the terminal. I found it really annoying that you couldn’t select the text and copy it.

mac copy path to terminal

So if you really want to type it this is your solution. Although when you control-click and “Get Info” the location of that file is displayed in the window, you can’t select it. I’m pretty sure it was easy enough to do in windows.

#Mac copy path to terminal mac os x#

So first I was surprised that mac os x doesn’t do this out of the box. I know it’s a small thing, but these small things add up… that would be easy for anyone to navigate to, while not having to type it manually.

mac copy path to terminal

I looked for a way to get the path to a file like a url online. An issue I’ve had with managing multiple files and versions of files and different servers and emailing files around to different people throughout a process… you get the idea.









Mac copy path to terminal