No, since you have the PDF open, you cannot rename it.
What content are you going to use?
It could be saved under a new name using form fields or the PDF properties of key words, subject, or title if the properties are field in for the PDF. But this type of coding will require some special code in folders.
All my files have key words on the same place. And saving them under a new correct name is what im looking for. Can I send you an example of the pdf that would need to be renamed?
We are here to help you with script problems not write the entire script for you.
So the script below just saves your pdf as "x" in the same location. But how can I change this X into a value/text present on my PDF?
// Split Path into an array so it is easy to work with
var aMyPath = this.path.split("/");
// Remove old file name
// Add new file name
// Put path back together and save