Using Terminal to get a path

When using scripting in Photoshop, you'll often want to point to a file or files you want to run a script on.

Here's a quick tip to determine a path on OS X.

Launch the application Terminal. It's located in the 'Utilities' folder inside the 'Applications' folder.

Drag the file you want the path for to the Terminal window.

Terminal displays the path for Ducky.tif.

You can cut and paste the path from the terminal window to your script.

Note: Spaces in file names and folders are 'escaped' using a '\ '. In the example above, the folder titled "Adobe Photoshop CS" becomes "Adobe\ Photoshop\ CS".