Re: Counting Text Strings In a Directory

2021-12-09 Thread Richard Fairbanks
Hi, Chris! Thank you so much for the script; I have been testing it out with various configurations, and it’s working great! You have shown me that after many years, I still have a lot to learn about the endless enigma known as “AppleScript.” ;-) Blessings, and thank you! On Tuesday,

Re: Counting Text Strings In a Directory

2021-12-07 Thread Christopher Stone
> On Dec 07, 2021, at 20:44, Richard Fairbanks wrote: > I want BBEdit to return the number of times a text string appears in the > files in a directory. The following works to replace any such text: Hey Richard, The simple way is to do a straight file search: If you want to script it then

Counting Text Strings In a Directory

2021-12-07 Thread Richard Fairbanks
Greetings, folks! I want BBEdit to return the number of times a text string appears in the files in a directory. The following works to replace any such text: tell application "BBEdit" to replace "text1" using "text2" searching in {file "path:to:directory:"} But I can’t figure out how to get