2010-11-21

How to avoid typing the full path of a file in Mac OS X

Occasionally in Mac OS X I want to write the full path of a file in a Bash script or something. To avoid typing out the full path (and possibly making errors) just:

  • Go to the file in Finder.
  • Hit Cmd-I to bring up the Get Info window for the file.
  • Block and copy the path from "General > Where:" section of the Get Info box into your text file.
  • Block and copy the file name from the Get Info box.

2 comments:

Henri Cervantes said...

on some computers in my department you can't select the text of the path to a file on a shared server, but on others you can. what gives?

Anonymous said...

Or.. Just drag and drop the file or directory from Finder to the Terminal window in which you're editing the bash script.