Good morning everyone.
Ive been trying to look for a way to do this everywhere, I found once a script and I lost it.
I want to rename .pdf files based on content inside them
For example, if the .pdf file has a
this.getField("Text1").value
and
this.getField("Text3").value
I want the file to be renamed to
"Text1"&"Text3"
Example
"Text1" = Joe
"Text3" = 1984
Then, rename file as "Joe 1984"
The .js file I found was external, the explanation I saw was that it cannot be done with a javascript inside the .pdf since you cannot rename a file while using it.
Thanks in advance for the help.
Rename files based on content
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
- Tracker Supp-Stefan
- Site Admin
- Posts: 17906
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Rename files based on content
Hello Ocasio,
Did you find that script on our website/forum, or on a third party's website?
Indeed renaming the file while it is open with JS inside the file itself is not really an option, but you may be able to save a copy of that file with the new name. Have you tried such a script?
Kind regards,
Stefan
Did you find that script on our website/forum, or on a third party's website?
Indeed renaming the file while it is open with JS inside the file itself is not really an option, but you may be able to save a copy of that file with the new name. Have you tried such a script?
Kind regards,
Stefan
Re: Rename files based on content
I forgot where I found it but I know it was a forum, not this one. But I remember it has a .pdf and an external .js file
Both options, save while open to another file or rename a closed file are useful to me.
If you could help me out with both of those, I would appreciate thanks.
Both options, save while open to another file or rename a closed file are useful to me.
If you could help me out with both of those, I would appreciate thanks.
- Tracker Supp-Stefan
- Site Admin
- Posts: 17906
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Rename files based on content
Hello Ocasio,
If you manage to find the script - you can give it a try with the /runjs command line parameter that the Editor supports:
https://help.pdf-xchange.com/pdfxe ... ns_ed.html
Kind regards,
Stefan
If you manage to find the script - you can give it a try with the /runjs command line parameter that the Editor supports:
https://help.pdf-xchange.com/pdfxe ... ns_ed.html
Kind regards,
Stefan