Multiple find/replace from a pre-defined list?

Tool for Search and Replace across multiple files.
Post Reply
Jaybee
Posts: 3
Joined: Mon Dec 22, 2014 12:41 pm

Multiple find/replace from a pre-defined list?

Post by Jaybee »

Hi,

Just discovered TextCrawler and have been playing around with the Lite version but I can't quite get my head round the syntax I might need to do what I want. Wondered if I can just check this before purchase? Here's what I need it to do:

1) I am a photographer with thousands of images
2) I have images that have keywords in them so they can be found in a database.
3) I have a new project that is going to require the updating/replacement of some keywords in many of the images. For example, where I may have the word "people" in an image's keyword set I need to change that keyword to "incidental people". Where I may have the word "city" I need to add the keyword "urban view" etc. There are many more variants like this (probably about 100).

To do this by hand would take months (open image in editor, change keywords that need to be changed from pre-defined list, re-save etc). Looking at TextCrawler I think it can do this automatically... I just can't work out how... :)

The good news is I already have a program that can export all my keyword sets to a csv or text or xls file and then re-import them to the correct image file once modified, so that's sorted. I just need to be able to modify the keyword sets automatically.

Once a range of images is exported I'd have a text file (let's call this the "Keyword file") with hundreds of rows that can look like this:

filename1.jpg[tab] cat, dog, horse, field, gate, green, outdoors (etc)
filename2.jpg[tab] boat, ocean, outdoors, sea, blue (etc)
filename3.jpg[tab] house, street, city, road, pavement, door, car (etc)

I have another text file that has the "replacements" or "additions" that are needed where a keyword exists (let's call this the "Replacements file table"):

existing[tab]replacement/addition
city[tab]urban view
cat[tab]feline
pavement[tab]sidewalk etc.


Can Text Crawler.....?

1) Look at each line of the Keyword file in turn
2) Find the keywords in that string that match any of the entries in the Replacements file table
3) Replace or Add them to the Keywords file with the new word contained in the Replacements file table

Is that possible? Or is there another way it can achieve the same result.

Thanks in advance...

J
User avatar
DigitalVolcano
Site Admin
Posts: 1717
Joined: Thu Jun 09, 2011 10:04 am

Re: Multiple find/replace from a pre-defined list?

Post by DigitalVolcano »

I think you should be able to do what you want using the batch processor.

You can import a list of find/replace pairs and then use this on the keyword file.
More info here: http://www.digitalvolcano.co.uk/textcra ... editor.htm

You can try the batch mode editor in the Pro version for free (30 day trial) and see if it's what you need.
http://www.digitalvolcano.co.uk/tcdownloads.html

Thanks!
Jaybee
Posts: 3
Joined: Mon Dec 22, 2014 12:41 pm

Re: Multiple find/replace from a pre-defined list?

Post by Jaybee »

That's great news indeed, thanks! I'll do just that and see how I get on, I thought it must have something to do with batching :)


J
Jaybee
Posts: 3
Joined: Mon Dec 22, 2014 12:41 pm

Re: Multiple find/replace from a pre-defined list?

Post by Jaybee »

Quick update to say that on initial tests TextCrawler Pro did indeed work like a charm.

Pro version purchased, thanks!

J
PJR5485
Posts: 2
Joined: Mon Aug 03, 2015 3:16 pm

Re: Multiple find/replace from a pre-defined list?

Post by PJR5485 »

Hello, I am also trying to use find/replace for multiple words. I have created a text file with (old name) space (new name). The link provided above does not exist anymore. Can someone provide instructions on how to perform a find/replace using a reference file or pre-defined list?

Thanks,
User avatar
DigitalVolcano
Site Admin
Posts: 1717
Joined: Thu Jun 09, 2011 10:04 am

Re: Multiple find/replace from a pre-defined list?

Post by DigitalVolcano »

Ooops, the manual was updated and the link broke. Updated link:

http://www.digitalvolcano.co.uk/textcra ... __pro_.htm

You can import a comma or tab separated file of find-replace pairs.
PJR5485
Posts: 2
Joined: Mon Aug 03, 2015 3:16 pm

Re: Multiple find/replace from a pre-defined list?

Post by PJR5485 »

Thanks for the quick response! I have loaded a .CSV file into the Batch editor. The batch editor shows all of my find/replace conditions. However, I cannot replace using TextCrawler. After clicking USE in Batch Editor I click Find. 908 matches are found. I click replace and it says "No Matches Found." Any idea why it won't replace?

Thanks
User avatar
DigitalVolcano
Site Admin
Posts: 1717
Joined: Thu Jun 09, 2011 10:04 am

Re: Multiple find/replace from a pre-defined list?

Post by DigitalVolcano »

Not sure why this should happen. Are there any other messages (e.g. the files to replace are read-only)?

Have you kept the program on the 'Batch commands' tab when clicking replace? Does it find all the matches again if you click 'Find'?
workerONE
Posts: 1
Joined: Fri Mar 04, 2016 6:58 pm

Re: Multiple find/replace from a pre-defined list?

Post by workerONE »

PJR5485 wrote:Thanks for the quick response! I have loaded a .CSV file into the Batch editor. The batch editor shows all of my find/replace conditions. However, I cannot replace using TextCrawler. After clicking USE in Batch Editor I click Find. 908 matches are found. I click replace and it says "No Matches Found." Any idea why it won't replace?

Thanks
You need to check "Process line-by-line" on the right and it will work.
Post Reply