Copy link to clipboard
Copied
As stated in subject title, I am looking for a way to save all open files to one specific folder without needing to save and path each one manually. I've looked into this before posting, and found previously suggested solutions such as the one here (https://answers.acrobatusers.com/How-to-save-all-open-files-to-a-specific-folder-Adobe-Acrobate-XI-P...
I've attempted to run scripts such as the one in the link, and searching the error messages given by the console leads me to believe that those scripts no longer work with current versions. I have run out of suggestions from older posts and am unfortunately not very good at using javascript myself. Any help is greatly appreciated.
Copy link to clipboard
Copied
What error messages does you get?
Copy link to clipboard
Copied
"
NotAllowedError: Security settings prevent access to this property or method.
App.beginPriv:9:Menu save all pdfs?:Exec"
Copy link to clipboard
Copied
Saving a pdf from a script requires priviledge. Here's a couple articles that explain it all:
https://www.pdfscripting.com/public/How-to-Save-a-PDF-2.cfm
https://www.pdfscripting.com/public/Trust-and-Privilege-in-Acrobat-Scripts.cfm
Copy link to clipboard
Copied
That's good information, I can see why the given scripts fail, but I'm still failing to apply it. Struggling to create my own scripts.
Still, thank you for the info, it's progress
Copy link to clipboard
Copied
Well first, can you repeat the script in the article for saving the current PDF? If you can do that, then we can extend it to all open PDFs.
Copy link to clipboard
Copied
Working through the scripts on that page, the most complex one I could get to run was
this.saveAs("/c/temp/temp.pdf");
which seems to run perfectly. The rest give a variety of error messages, such as
this.saveAs("/c/MyDocs/" + this.documentFileName);
giving the error
UnsupportedValueError: Value is unsupported. ===> Parameter cPath.
Doc.saveAs:1:Console undefined:Exec
undefined
The above script is probably closest to what I need to do, but I show the errors given when the other scripts are run if necessary.
(On a side note, sorry for taking so much of your time. I was hoping this would be an easier fix, my apologies.)
Copy link to clipboard
Copied
Does /c/MyDocs/ exists?
Copy link to clipboard
Copied
Yes, I created it after the first time it failed. Same issue. I also tried replacing that name with other pre-existing folders, which still failed.
Copy link to clipboard
Copied
Do your file-names contain special characters, or a comma, by any chance?
Copy link to clipboard
Copied
One of them did, but I tried with several that did not.
Copy link to clipboard
Copied
Are you testing these scripts from the console window? This would help a great deal in your testing.
This article shows how to make a trusted SaveAs function, which is what you need
https://www.pdfscripting.com/public/Using-Trusted-Functions.cfm
Once you have that function working properly, it can be modified to act on all the documents.
Here's a very simple script that will save the document back to itself. This is at the heart of the solution you need.
this.saveAs(this.path);
Copy link to clipboard
Copied
The scripts at the link you provided crap. Please refer to my post above for the correct information.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now