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

Can wildcard be used in links

jer411us
Registered: Jun 24 2008
Posts: 3
Answered

Hi

I am in the process of creating document that links to different manuals. The problem is that the manuals are updated every 3 months.
The document name stays the same except for the last 2 digits.

example 50123-LMO-21.pdf and the new version might be 50123-LMO-23.pdf

Is there a way to include a wildcard in the link so Adobe only looks at first x digits?
Is there a way to create a Javascript to do this so I could just copy the updated files to the same folder and not have to update each link?

thanks

My Product Information:
Acrobat Pro 7.0.9, Windows
jbfreels
Registered: Feb 19 2008
Posts: 63
You could write a JavaScript that would perform a loop that would start at, lets say 20, and do...
try{for (var i = 20; i < 99; i++){var pdf = "50123-LMO-" + i + ".pdf";var doc = app.openDoc(pdf);if (null != doc){break;}}}catch(e){...}

yeah, that should do it. This was all done off the top of my head, so be sure to step through it.
jbfreels
Registered: Feb 19 2008
Posts: 63
Sorry, I got mixed up on your question because I answer a lot of questions in the JavaScript forum.

My solution will require Adobe JavaScript, and no, you can't use wild-cards.
jer411us
Registered: Jun 24 2008
Posts: 3
Hi
Thanks for the help. The code works.