• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

Find and replace text across multiple Illustrator files

Community Beginner ,
Apr 27, 2018 Apr 27, 2018

Copy link to clipboard

Copied

With the printers now looking for AI or EPS files, I have run into this problem a lot.

Is there a way to find and replace text across multiple Illustrator files like you can do in Indesign & Dreamweaver? It would save me days of double-clicking and pasting.

Please help.

Wayne

Views

11.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 06, 2018 May 06, 2018

Hi Wayne, here's a script that replaces XXXX with NEW YORK across all open documents. Let me know if you need help changing the script to find something more meaningful.

 

 

// findReplace.jsx
// carlos canto
// https://forums.adobe.com/thread/2484457

function main () {
    var idoc, search_string, replace_string, tframes, i, tframe, new_string, counter=0;
    for (var a=0; a<app.documents.length; a++) {
        idoc = app.documents[a];

        search_string = /xxxx/gi; // g for global search,
...

Votes

Translate

Translate
Adobe
Explorer ,
Jan 21, 2021 Jan 21, 2021

Copy link to clipboard

Copied

Fantastic, Thanks.

Just what I needed to update small amount of text in hundreds of book illustrations.

However I do lose the text formatting which is a bit of a problem.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 18, 2021 Nov 18, 2021

Copy link to clipboard

Copied

Hi @CarlosCanto, I have some Illustrator artwork that includes financial data that was created which formats text with periods (eg. $1.000.000) but I need to change to format it with comas (eg. $1,000,000). I tried to use this script by replacing . with , but that didn't work (it turned all my text into comas). Is there a particular way I should search or is there a way the script can be modified to account for that type of query?

 

Thanks in advance!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 23, 2021 Nov 23, 2021

Copy link to clipboard

Copied

hi @ReingoldPredmore, add a backslash before the dot "\."

 

the dot by itself it's a reserved character that represents every character

 

that should take care of the problem.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 15, 2021 Dec 15, 2021

Copy link to clipboard

Copied

After testing, the following metacharacters are not executed correctly: ^ $ /n (?<=) (?<!) (?=) (?!)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 11, 2023 Dec 11, 2023

Copy link to clipboard

Copied

Hi Carlos.

 

This script ALMOST works for me. I'm trying to replace any periods/full stops with commas but when I do that, it replaces all text with commas. Is there something I can add to the script to fix that maybe?

 

Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 11, 2023 Dec 11, 2023

Copy link to clipboard

Copied

LATEST

Ignore me! Didn't see page 2 of this thread and someone asked exactly what I needed. Thanks so much!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines