Author Topic: Find and Replace to remove metadata  (Read 1446 times)

Offline myotis

  • Full Member
  • ***
  • Posts: 188
    • View Profile
Find and Replace to remove metadata
« on: October 14, 2021, 11:41:17 PM »
I want to remove the words and comma "Station Cottage,"   from every metadata field where it appears: Location, Title and Description.

I've tried find and replace but not sure what I should be using for the "replace" do I just leave this field blank?

I've tried a few options, but get an error that the search term(s) weren't found or there was an unrecoverable error.  I've also tried some of the options suggested in a couple of earlier posts from people getting the same error.

The Find dialog works fine , it's just when I try the find and replace options I get this error.

Should this work, and is there a better way of doing it?

Thanks,

Graham

I am on High Sierra and its Build 6097


Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24731
    • View Profile
    • Camera Bits, Inc.
Re: Find and Replace to remove metadata
« Reply #1 on: October 15, 2021, 03:58:20 AM »
Yes, leave the Replace field blank.  Is a comma really part of text in the field?

-Kirk

Offline myotis

  • Full Member
  • ***
  • Posts: 188
    • View Profile
Re: Find and Replace to remove metadata
« Reply #2 on: October 15, 2021, 07:12:42 AM »
Yes, leave the Replace field blank.  Is a comma really part of text in the field?

Good, so now that I know that a blank field should work, I need to figure out why I can't get it to work :-(

Is it because it's only part of a longer string in the field?

, Station Cottage, TownName, CountyName, England.

I want to remove the "Station Cottage," to end up with:

, TownName, CountyName, England.

I can get it to work if I first replace "Station" with nothing, and then replace "Cottage" with nothing.

Do I need to define the words as phrase some how  e.g. enter "Station Cottage,"    or (Station Cottage,)

I can do it a word at the time and just ignore the comma.   My GREP skills aren't up to working out how to remove it.

Thanks for your help.

Graham

Offline ahoward

  • Camera Bits Staff
  • Hero Member
  • *****
  • Posts: 767
    • View Profile
Re: Find and Replace to remove metadata
« Reply #3 on: October 15, 2021, 10:00:34 AM »
Hi Graham,

First, please make sure that there is no invisible characters (spaces, new lines, tabs, etc) that the Find field may be looking for, I usually suggested hitting the down arrow a few times to make sure there are no extra lines in that field. If that isn't the solution, please post a screenshot of your Find and Replace window and the Info window for an image where you expect this Find and Replace operation to work. It may also be helpful to have a log file with Find and Replace logging enabled, as Kirk describes in this thread: http://forums.camerabits.com/index.php?topic=14493.0

Offline myotis

  • Full Member
  • ***
  • Posts: 188
    • View Profile
Re: Find and Replace to remove metadata
« Reply #4 on: October 16, 2021, 03:06:58 AM »
Hi Graham,

First, please make sure that there is no invisible characters (spaces, new lines, tabs, etc) that the Find field may be looking for, I usually suggested hitting the down arrow a few times to make sure there are no extra lines in that field. If that isn't the solution, please post a screenshot of your Find and Replace window and the Info window for an image where you expect this Find and Replace operation to work. It may also be helpful to have a log file with Find and Replace logging enabled, as Kirk describes in this thread: http://forums.camerabits.com/index.php?topic=14493.0

After finding the replace field only needed to be empty, I revisited the range of options (what boxes needed to be ticked) and eventually got it to work. 

I can't remember what the defaults were when it initially gave the error, but it's now working.

Thanks for your help.