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

Append name to file

b.whitham
Registered: Aug 25 2011
Posts: 1

I've been trying to create a custom save button on a form I've made. My scripting knowledge is minimal so I've kind of hit a wall here. Hoping this is a simple enough problem.
 
I was testing out the "app.execMenuItem()" and the "this.saveAs()" commands which work well but I'm lost now as to how to append a name to them. I referenced this article (http://acrobatusers.com/tutorials/file-paths-acrobat-javascript) but can't sift through it enough to find a solution.
 
Just want a user to be able to click on a button and have it save the file with "release" added to the end of the name. So if the file were "MyPDF.pdf" when you clicked the button it would then be "MyPDF_release.pdf".
 
Make sense? Thanks in advance for any help/suggestions.

My Product Information:
Acrobat Pro 9.0, Macintosh
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1875
Check out this tutorial: http://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript