You designed an InDesign document, using a number of images, and you want to replace those image links with new source files whose names differ from the previous following a predictable pattern. This script will enable you to use InDesign's "Find/Change" dialog box to replace those links.

Example 1: your page layout was achieved using 640-pixels versions of royalty-free pictures from Pixabay, ending with "_640.jpg", and now you made up your mind at least to register to this site in order to be able to download those same pictures in full resolution, the downloaded files have the same name as the previous ones without the "_640" suffix. To replace the links you just need to

open the dialog box Find/Change > Text
type in:
Find what: _640.jpg
Change to: .jpg
Run the script
Select the folder to search in for the links
The script then displays the search results in a window, in many tabs if the result count is high. You can then optionally uncheck some links that you don't want to replace
Validate the window ("OK" or "Replace all checked links" depending on the script version) > Checked replacements are processed.

To proceed the reverse modification, replace all full-res versions with the 640px versions:
Find/Change > Text
Find what: .jpg
Change to: _640.jpg
Run the script, etc.

find change links indd 002 en

Example 2: you still have lower resolution pictures from Pixabay to replace with their full-res versions, but this time you have a mix of 640px, 1280px and 1920px versions (ending with "_640.jpg", "_1280.jpg" or "_1920.jpg"). This time your will have to use:

Find/Change > GREP
FindWhat: _\d+\.jpg
Change to: .jpg
Run the script, etc. (Demo)

Hence the benefit of using the existing Find/Change GREP dialog box that allows you to use the Special Characters icon @ to help you to build your regular expression, because not everybody knows by heart the GREP syntax.

To process the reverse modification restoring the different lower resolutions pictures in place of the full-res ones:

Find/Change > GREP
FindWhat: \.jpg
Change to: _\d+ \.jpg
Run the script, etc.

Notice that in this last specific case "Change to" is also a regular expression, which is not normally expected in InDesign's Find/Change GREP dialog box, but this will enable the script to understand that he must replace the images with others whose ".jpg" extension is preceded by an underscore and one or more digits[1].

The script could then find multiple matching files, if for example your startup image is named chihuahua-2101644.jpg and the search folder contains both chihuahua-2101644_640.jpg and chihuahua-2101644_1920.jpg: for this reason the results are shown in dropdown lists (actually even for single match) in the results window, allowing you to chose before validating the replacements.

The "Include locked layers and items", "Include hidden layers and items" and "Include master pages" options from the "Text" and "GREP" tabs will be taken into account,
The "Case sensitive" option from the Text tab will be taken into account also for the GREP search.

    The new version 13:
  • Better deals with some accented characters on Mac OSX that previously were sometimes not recognized because of the composite unicode (NFD) encoding of the file system (modified after the problem was reported by Andreas Rößner, head of a design studio in Munich).
  • Proposes, if any, to look for the links to replace also in the sub-folders within the selected folder (modified according to a request by Joke Wouters).
  • Unlike in the previous versions, now a single version is provided, displaying a "palette" window that enables you, from within the results tabs, to select each link, showing where it is located, and decide optionally to replace it individually in order to see the difference, or to replace all checked links at once. Tested without problem on many InDesign versions including an old CS5.5.

[1] In example 2 I used the most easy to understand syntax for GREP beginners, but we may also use

Find what: _\d+(\.jpg)
Change to: $1

and the reverse search

Find what: (\.jpg)
Change to: _\d+$1

"Change to" is then an unusual regular expression including a submatch $1 from a previous regex — hybridization correctly interpreted by my script. Entire match $0 also works but will be replaced with its javascript equivalent $&

Add comment

0 # Ilana 2020-11-23 11:47
Magnificent goods from you, man. I have understand your
stuff previous to and you are just too fantastic. I actually like what you have acquired here, certainly like what you are saying and the way in which you say it.
You make it entertaining and you still care download newtown [spam] for
pc: to keep it sensible. I cant wait to read far more from you.
This is really a terrific web site.
0 # Teddy 2020-11-23 00:36
Have you ever thought about including a little bit more than just your articles?
I mean, what you say is valuable and all. However just imagine
if you added some great visuals or video clips to give your posts more,
"pop"! Your content is excellent but with pics and video clips, this site could certainly be one of the greatest in its field.
Terrific blog!

Feel free to visit my web-site play online [spam] malaysia:
0 # Joie 2020-11-22 14:50
Going support you much specially for competitive keywords.

The problem with Headline tags is how the text is massive and it leaves a leaves a
mechanical line break underneath. Use Google to locate a site to undertake that.

My web site jokers [spam]:
0 # Danae 2020-11-22 07:46
Hey! This is my first visit to your blog! We are a group of volunteers and starting a new project in a community in the same niche.
Your blog provided us useful information to work on. You have done a marvellous job!

Also visit my blog post online [spam]
malaysia 2018:
0 # Aracely 2020-11-22 07:35
Aw, this was an exceptionally good post. Taking the time and
actual effort to create a really good article… but what can I say… I put things off a whole lot and don't manage to get anything done.

my web site ... [spam] slot games
free for ipad:
0 # Florian 2020-11-22 01:28
I attempt to remember to live because of it - but it still takes practice.
A face lift can be an effective procedure for some people, but
not befitting everyone.

my web blog - [spam] slot machines how do they work:
0 # Concepcion 2020-11-20 13:33
I blog quite often and I seriously appreciate your content.
This great article has really peaked my interest. I will take
a note of your site and keep checking for new information about once per week.
I subscribed to your RSS feed as well.

Also visit my blog post: download [spam]
0 # Clifford 2020-11-20 12:35
I was recommended this blog by way of my cousin. I am no longer sure whether this post is written by way of him as no one else understand
such special approximately my trouble. You are wonderful!

Look at my blog - ocean king restaurant
0 # Johnnie 2020-11-20 10:31
For the reason that the admin of this site is working, no hesitation very quickly
it will be famous, due to its feature contents.

my web page :: where is auto parts warehouse located:
0 # Alfred 2020-11-18 22:38
I reazd thіs piece of writing fսlly on thhe topic of
the comparison of newest and preceding technologies,
it's awesome article.

Check out my web-site Malaysian Online [spam]:
0 # Eloise 2020-11-18 14:24
Getting that precisely the first few sites the actual planet results get
all the traffic. French Lick Springs Resort Brings Expect to Orange County, Indiana - Also from September of 2007.
Try it, totally . not be sorry for.

Also visit my site - mobile raceways slot cars:
0 # Fanny 2020-11-18 12:56
Many thanks, Useful information.
Best Essay writing
statistics essay:
0 # Louann 2020-11-18 03:25
Thanks a lot, I apprefiate this!
Best Essay writing
cheap essay writing service:
0 # Sherrill 2020-11-17 13:38
Excellent site you have here but I was curious if you knew of any user discussion forums that
cover the same topics talked about here? I'd really love to be a part of community where I can get feedback from other knowledgeable
people that share the same interest. If you have
any recommendations , please let me know. Thanks!

Feel free to surf to my web blog:
0 # Mirta 2020-11-16 14:50
Everything is very open with a clear description of the challenges.

It was really informative. Your website is extremely helpful.

Thank you for sharing!

Take a look at my web-site - sky777 demo:
0 # Jamika 2020-11-16 09:21
Have you ever considеred writing an e-book or guest authoring
оn ᧐ther websites? І have а blog based upοn oon thee samе ideas you discuss
and woսld lopve tto hɑve yⲟu share sоme stories/informa tіօn.
Ӏ кnow my audience would enjoy your wߋrk.
If уou're even remotely interеsted, feel free tto ssnd mee аn email.

Feel free to visit mу һomepage :: smok prince Cobra:
0 # Melba 2020-11-16 02:00
I need to to thank you for this wonderful read!! I definitely loved every little bit of
it. I have got you book-marked to look at new stuff you post...

Here is my web site: junk yards ogden utah:
0 # Chiquita 2020-11-15 20:05
There is visibly a lot to realize about this. I believe you made some nice points in features also.

Also visit my web blog; pul car:
0 # Georgetta 2020-11-15 17:17
Greetings! I've ƅeen following your wweb site for ѕokme tіme now
and finaly got the courage to go ahead andd ցive you a shout out from Huffman Tx!

Just wanted to tell you keep upp tһe fantastic work!

Ϝeeel freee to surf to mmy webpage malaysia online
game:[spam]website95 474
0 # Danielle 2020-11-15 16:27
You have brought up a very fantastic details, appreciate
it for the post.

Take a look at my web blog ... selling my car:
0 # Jacklyn 2020-11-14 01:31
Heya i am for the primary time here. I came across this
board and I find It really useful & it helped me out a
lot. I'm hoping to provide something again and help
others such as you aided me.

Feel free to surf to my site - salvage auto parts detroit:
0 # Kami 2020-11-13 23:28
We're a gaggle of volunteers annd opening a brand new schrme
in our community. Your site offered us with useful
information tto work on. You've done a formidable task and our entire
community will probably be thankful to you.

Here is mmy website: online mobile [spam] malaysia:[spam]206763
0 # Manuel 2020-11-13 20:19
Thank you for sharing excellent informations. Your site is very cool.
I'm impressed by the details that you've on this website.

It reveals how nicely you understand this subject. Bookmarked this website page, will come back for more articles.
You, my pal, ROCK! I found just the information I already searched everywhere
and simply couldn't come across. What an ideal web site.

Stop by my website; advance auto bristol:
0 # Roma 2020-11-13 15:01
Gooԁ Morning, I ɑm a permanent vape ɑnd also [spam] influencer
ɑt Ӏ am seeking vape as well аѕ
how much [spam] to take for hormone imbalance: reviewers tο review eliquid from Blends
Salt Nic Ƅy One Up Vapor, Humble х Flawless Collaboration аnd Pure Energy eJuice ɑnd [spam] Tinctures from Fuggin [spam].
In case anyone аt scriptopedia.οr g is intеrested,
do get in touch! Мany thanks
0 # Lupita 2020-11-13 10:59

We are the leading Intenational Hemp, Vape ɑnd [spam] Shhop Webzite Directory tһat
iss thе staple of sⲟme of the νery finest [spam] brand names.
Liist ʏour company and receive new leads now. We һave beеn featured in ѕome widely
recognized newspapers аs weⅼl as magazines including Allure, Tatler, Vogue аnd Vanity Fair ɑnd have a reaⅼly
lively Hemp annd [spam] һow much tο take: https://just[spam] blog that attracts һigh quality web site traffic fгom the
UK and USA. Listing on oᥙr business directory ѡill hеlp yoս to gain brand-new customers аnd improve
yߋur brand'ѕ visibility.

We arе continuing to support vape аnd
[spam] companies ⅾuring tһiѕ challenging tіmе. We һave reduced
tһe price of our listings packages by 80%. As part of уour listing, customers wіll Ье capable tο contact ʏoս straight via your listing web pаge via a contact form.

List yoᥙr company rіght noԝ at

We look forward to seeing scriptopedia.օr g onboard.

Have an incredible day!


0 # Mercedes 2020-11-13 04:08
Everyone loves what you guys tend to be up too. click this link: type of clever
work and coverage! Keep up the very good works guys I've added you guys to my blogroll.
0 # Forrest 2020-11-13 03:58
I don't even know how I ended up here, but I thought this
post was good. I do not know who you are but definitely you're going to a famous blogger if you are not already ;) Cheers!

Review my webpage ... join now:
0 # Debora 2020-11-13 01:38

Ꮃe are the toр Worldwide Hemp, Vape ɑnd [spam] Store Directory tjat іs
the staple of many of the ѵery best [spam] brand names. Liist
your business and enjoy brand-new leads now.
Ԝe һave ben featured in some welⅼ-known tabloids ɑs well aѕ magazines lіke
Allure, Tatler, Vogue аnd Vanitfy Fair аnd havе ɑ very lively Hemmp and [spam] blog
that brings in top quality site traffic fгom tһe UK and UNITED STᎪTEЅ.

Listing on ᧐ur business directory ѡill һelp yߋu to acquire neԝ customers and improve your brand'ѕ visibility.

We are contibuing to support vape аnd [spam] businesses tһroughout this challenging tіme.
We have slashed tһe pricе of oսr listings
buneles Ƅy 80%. As part of yoᥙr listing,
clients wіll havе tһe opportunity tо get in touch with you
straight via your listing web ⲣage ᴠia a
contact fօrm.

List your company now at

We look forward to seеing scriptopedia.ߋr g

Hаve an awesome Ԁay!



my homepage ...
0 # Jada 2020-11-13 00:58
Very quickly thiѕ website will be famoᥙs amid all blogging aаnd ѕite-building visitors, duе to it's fastidiouѕ

my web-site ... malaysia truѕted oonline
[spam] - Julio:[spam]206763,
0 # Pat 2020-11-12 13:35
Hi there, its pleasant paragraph on the topic of media print,
we all understand media is a impressive source of facts.

Also visit my blog post - car dash
parts com:
0 # Deandre 2020-11-12 00:06
Do you have a spam problem on this site; I also am a blogger, and I was wanting to know
your situation; many of us have created some nice methods and we are looking to swap strategies with others, be sure to shoot me
an e-mail if interested.

Also visit my web site cheap car parts
0 # Georgianna 2020-11-11 20:24
Hi friends, how is the whole thing, and what you desire to say on the topic of this paragraph,
in my view its in fact awesome designed for me.

Also visit my page: advance auto
parts distribution center enfield ct phone number:
0 # Nestor 2020-11-11 11:28
At Eternity Girls we have especially selected ladies with whom you will get along from the

my web page - brussels escorts backpage:
0 # Blondell 2020-11-09 16:20
What a person say a person have talk to yourself?
Check with the firm or even the dress fashion designer.
His roving eyes keep following them the actual evening, although he
never flirts together.

Here is my website: ocean king app:
0 # Francine 2020-11-09 05:11
Google LOVES pages that are tightly related the search terms.
Use keyword research to determine what people are
seeking for answers on. These sites will a person rank larger.

Also visit my web-site :: 918 kiss:
0 # Maxine 2020-11-09 01:53
Please let me know if you're looking for a article author for
your site. You have some really great articles and I believe I
would be a good asset. If you ever want to take some of the load off,
I'd absolutely love to write some articles for your blog in exchange for a link back to mine.
Please shoot me an email if interested. Many thanks!

Also visit my web site: download [spam]
king 2:
0 # Niklas 2020-11-08 21:30
With you possess your friends nearby on your good opinion and encouragement.
Are you going to day trade, or hold your positions for a number of?
Seeing him should not be a amount of drama.

Also visit my web blog :: m.2 slot ssd:
0 # Kattie 2020-11-07 15:57
Thank you for the good writeup. It in fact was a amusement account it.
Look advanced to more added agreeable from you! However, how could
we communicate?

Take a look at my homepage: check here:
0 # Cecelia 2020-11-07 10:21
Aw, this was an extremely nice post. Taking the time and actual effort to create a superb article...

but what can I say... I procrastinate a whole lot and never
manage to get anything done.

Also visit my blog post ... advance auto lakewood:
0 # Andrew 2020-09-27 20:01
Perfect! Just what I needed.

Joke Wouters
0 # Joke Wouters 2019-12-04 21:43
This is exactly what I'm looking for except that the script needs to search subfolders also. Can I change that option in the code? Or is that too hard?

I have multiple files to find/change but there divided into subfolder.

Can you help me?
0 # robinfredericf 2020-02-25 23:35
I added that option in the new version 13. Best regards — Frédéric Robin.
0 # Amaury 2019-11-29 01:47
Awesome Script! I was looking for this for a long time.

Works great! A very powerful time saver.

Thanks a lot.

0 # robinfredericf 2017-03-31 16:11
The mediabox popup showing my animated gif demo seems to often crop it depending on your screen size and browser window size, so I also added a (→ Demo) direct link to it.
Note: the text colorization is post-processed on the demo movie to highlight and clarify the regular expression and show what it matches, but you won't see text colorized like that in your InDesign interface when you will use the script.

Follow Scriptopedia to Social Network

Scriptopedia sur facebook


An original idea from Loic Aigon, designed by Eddy.VH. It 's a scripts library for Desktop Publishing Adobe products. Find Javascript for Photoshop, Illustrator, inDesign and Acrobat or ATN scripts ( Photoshop actions ) you need.