These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

How to retrieve pdf file location.

svelasco
Registered: May 8 2007
Posts: 27
Answered

Hi,

I have created an index from a few hundred pdf files. It works just fine. A user asked me today how he could - easily - retrieve the document location (path and filename) so that he could create and share the link to the particular pdf with other users (via e.mail for example). I found the "location" in the Document Properties, but it only opens the folder. You'd have to:

search for the pdf
open the pdf
open the document properties
(couldn't find out how to copy&paste the location data)
so click to open Explorer
copy the path
copy the filename
send the e.mail

*whew*

Is there an easier way ?

If it could be done, would it also be possible to add a button to the toolbar with "copy file location and filename to clipboard", for example ?

Thanks, and have a good weekend !

My Product Information:
Acrobat Pro 8.1.2, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
You will need a full version of Acrobat not Reader.

Create a new bookmark.
Add the following "JavaScript" action to the bookmark:

console.show(); // open console
console.clear(); // clear contents
console.println(this.path); // display the current pdf's path

Save the action.
set the action.
Double click the new bookmark.

You can now select the displayed text and cut and paste.

George Kaiser

svelasco
Registered: May 8 2007
Posts: 27
works great !

when I put it together with a javascript to create a bookmark I could add a "path to file" bookmark to all the pdf's via a batch process.

excellent ! thanks.
dollivier
Registered: Dec 9 2010
Posts: 1
Great suggestion. Is there a way I can automate this and create this bookmark in each new document I create. I would rather not have to copy and paste this into each document?
thanks for any help.

D

Diane