Author Topic: Find fails to find double space in filename  (Read 1680 times)

Offline DavidHoffmanuk

  • Sr. Member
  • ****
  • Posts: 315
    • View Profile
Find fails to find double space in filename
« on: July 21, 2024, 10:21:04 AM »
I've a lot of files that have a double space in the filename eg '070112-126  BNP Oppose Anti Racist Protest At English National Ballet'. They are duplicates of files with a single space in their otherwise identical name & I'd like to delete them. I thought that a search for 'filename "  BNP"' would find them but that also finds the ones with a single space. Is there a way to separate these different sets?

David Hoffman

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Find fails to find double space in filename
« Reply #1 on: July 21, 2024, 03:13:13 PM »
David,

I've a lot of files that have a double space in the filename eg '070112-126  BNP Oppose Anti Racist Protest At English National Ballet'. They are duplicates of files with a single space in their otherwise identical name & I'd like to delete them. I thought that a search for 'filename "  BNP"' would find them but that also finds the ones with a single space. Is there a way to separate these different sets?

In general, the catalog system ignores white space (it tokenizes words).  So now that you have your results, you should be able to use the Find panel to search for your matching items.  Grep is available for particularly complex situations.

HTH,

-Kirk

Offline DavidHoffmanuk

  • Sr. Member
  • ****
  • Posts: 315
    • View Profile
Re: Find fails to find double space in filename
« Reply #2 on: July 22, 2024, 12:28:25 AM »
I've a lot of files that have a double space in the filename eg '070112-126  BNP Oppose Anti Racist Protest At English National Ballet'. They are duplicates of files with a single space in their otherwise identical name & I'd like to delete them. I thought that a search for 'filename "  BNP"' would find them but that also finds the ones with a single space. Is there a way to separate these different sets?

In general, the catalog system ignores white space (it tokenizes words).  So now that you have your results, you should be able to use the Find panel to search for your matching items.  Grep is available for particularly complex situations.

I've not really appreciated the difference between search & find or how useful grep is. Thanks Kirk, all sorted now.

David