skip to Main Content

I drag a lot of graphic files from Finder directly into InDesign and Photoshop. I use a vey simple bash script to quickly open the directory containing the file.

cd "/Volumes/Server/Resources/stock1/"

open .

The script opens the correct directory, but I would like to know how to get it to also go to a specified file (e.g., image.eps) and highlight/select it.
The directories I work with contain hundreds of files and have hard-to-look-through names. This would be a huge time-saver.

Thanks so much for any help. I’m using Mac OSX 10.9.5.

2

Answers


  1. Use the -R (aka --reveal) option to select a single file:

    open -R "/Volumes/Server/Resources/stock1/image.eps"
    

    Something like,

    open -R "/Volumes/Server/Resources/stock1/"*.eps
    

    will not select all eps files in the folder, but instead will select each one successively, so that the end result is only the last file is selected.

    Login or Signup to reply.
  2. @chepner’s answer (-R option) is great if you want to highlight just one file. If you want to select multiple files, you may want to use Apple Script like this:

    osascript -e 'tell application "Finder" to select files in folder "stock1" of folder "PHOTOS and IMAGES" of disk "Server" whose name ends with ".eps"'
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search