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

Comments   
Ilana
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: https://bizcart.com/user/profile/16149 to keep it sensible. I cant wait to read far more from you.
This is really a terrific web site.
Reply
Teddy
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: http://www.Blooddiseasehopkins.org/__media__/js/netsoltrademark.php?d=foodusa.xyz
Reply
Joie
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]: http://kaa.dn.ua/gb/
Reply
Danae
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: http://www.xmovs.com/user/3265073/IlaCutler1/info
Reply
Aracely
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: http://kaa.dn.ua/gb/
Reply
Florian
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: http://www.johnsonclassifieds.com/user/profile/1844403
Reply
Concepcion
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]
vectors: https://admag.com/user/profile/994
Reply
Clifford
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!
Thanks!

Look at my blog - ocean king restaurant
menu: https://Agroadsja.com/user/profile/284724
Reply
Johnnie
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: http://keywestwireless.com/__media__/js/netsoltrademark.php?d=karenselect44.webs.com%2Fapps%2Fblog%2Fshow%2F49070152-4-guidelines-for-getting-more-cash-to-all-your-junk-car
Reply
Alfred
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]: http://moirestudio.net/__media__/js/netsoltrademark.php?d=Acp.srv.br%2Findex.php%2Fblog%2F179259%2Frules-dont-forget-when-playing-live-poker%2F
Reply
Eloise
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: http://usadsciti.com/user/profile/11362
Reply
Fanny
0 # Fanny 2020-11-18 12:56
Many thanks, Useful information.
Best Essay writing
statistics essay: https://statistics-essay.com/
Reply
Louann
0 # Louann 2020-11-18 03:25
Thanks a lot, I apprefiate this!
Best Essay writing
cheap essay writing service: https://cheapessaywritingserviceusa.com
Reply
Sherrill
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: ace333.casa: http://agfibertechno.xyz
Reply
Mirta
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: http://kaa.dn.ua/gb/
Reply
Jamika
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: https://vapelifemag.com
Reply
Melba
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: https://sipcaster.com/ccawiki/index.php?title=User:ChristopherMcGol
Reply
Chiquita
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: http://yp1919.iwinv.net/xe/board_ipRf65/1582631
Reply
Georgetta
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: http://Elliwish.com/__media__/js/netsoltrademark.php?d=gg.gg%2Fonline[spam]website95 474
Reply
Danielle
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: https://pbase.com/topics/pailpiano46/how_carryout_a_bar_from_scra
Reply
Jacklyn
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: https://jewsunderattack.com/index.php/Used_Car_Prices_For_Antique_Cars
Reply
Kami
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: http://www.congreso-hidalgo.gob.mx/urls/scronline[spam]206763
Reply
Manuel
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: http://dellrosecypress.com/__media__/js/netsoltrademark.php?d=www.datafilehost.com%2Fd%2F9c9f0c43
Reply
Roma
0 # Roma 2020-11-13 15:01
Gooԁ Morning, I ɑm a permanent vape ɑnd also [spam] influencer
ɑt https://vapetelligent.com. Ӏ am seeking vape as well аѕ
how much [spam] to take for hormone imbalance: https://rosiehogg.com 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
Reply
Lupita
0 # Lupita 2020-11-13 10:59
Heⅼlo

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]store.uk 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 https://hempressa.com

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

Have an incredible day!

Ꭱegards

Mackenzie
Reply
Mercedes
0 # Mercedes 2020-11-13 04:08
Everyone loves what you guys tend to be up too. click this link: http://kasino.vin/home/sky-777/55-sky777 type of clever
work and coverage! Keep up the very good works guys I've added you guys to my blogroll.
Reply
Forrest
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: http://news.ezyget.com/881-mega888/profile
Reply
Debora
0 # Debora 2020-11-13 01:38
Hellο

Ꮃ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 https://vapetelligent.com

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

Hаve an awesome Ԁay!

Regаrds

Johanna

my homepage ... https://hempressa.com: https://Www.Brianmac.co.uk/articles/article457.htm
Reply
Jada
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ѕ
content

my web-site ... malaysia truѕted oonline
[spam] - Julio: http://Niaterotrust.org/__media__/js/netsoltrademark.php?d=www.congreso-hidalgo.gob.mx%2Furls%2Fscronline[spam]206763,
Reply
Pat
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: http://www.sabkaweb.org/q2a/151432/bmw-salvage-at-the-least-expensive-prices
Reply
Deandre
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
website: http://germansoldiers-clan.de/index.php?news-20
Reply
Georgianna
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: http://www25.tok2.com/home2/funaoki/cgi-bin/bbs/bbs.cgi/index.htm
Reply
Nestor
0 # Nestor 2020-11-11 11:28
At Eternity Girls we have especially selected ladies with whom you will get along from the
commence.

my web page - brussels escorts backpage: https://degreesweets74.bloggersdelight.dk/2020/11/09/escort-in-brussels-escort-girls-escort-girls-brussels-bruxelles-escort-escort-girls-belgium/
Reply
Blondell
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: http://apexsteel.co.in/?option=com_k2&view=itemlist&task=user&id=38200
Reply
Francine
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: https://www.ezyget.com/918kiss
Reply
Maxine
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: https://rsudpirngadi.pemkomedan.go.id/berita-177-pentingnya-memahami-hivaids.html
Reply
Niklas
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: http://www.xmovs.com/user/3597842/SantoStapl/info
Reply
Kattie
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: http://kasino.vin/home/ace333/51-ace333
Reply
Cecelia
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: http://elias.ztonline.ch?a%5B%5D=%3Ca+href%3Dhttps%3A%2F%2Fimages.google.pl%2Furl%3Fq%3Dhttps%3A%2F%2Fcajunkyardsnearme.com%3Esell+junk+car%3C%2Fa%3E
Reply
Andrew
0 # Andrew 2020-09-27 20:01
Perfect! Just what I needed.


Thanks!!
Reply
Joke Wouters
0 # Joke Wouters 2019-12-04 21:43
Hi!
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?
Reply
robinfredericf
0 # robinfredericf 2020-02-25 23:35
I added that option in the new version 13. Best regards — Frédéric Robin.
Reply
Amaury
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.

Amaury
Reply
robinfredericf
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.
Reply

Follow Scriptopedia to Social Network

Scriptopedia sur facebook

About Scriptopedia.org

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.