AS how to check if a file name matches a string in a text file
AS how to check if a file name matches a string in a text file
- Subject: AS how to check if a file name matches a string in a text file
- From: Jim Weisbin <email@hidden>
- Date: Sun, 29 Jun 2014 12:28:56 -0400
Hello. I’m fairly comfortable writing AS, but not an expert by any means.
I need to be able to do the following, and am looking for some pointers before I begin:
Open a text document (read-only is fine). The document will always be RTF format, created with TextEdit, so I think that precludes any kind of shell scripting to search it’s contents.
Open a folder and iterate through the filenames there (filenames only, no paths. That part is easy).
For each file name, see if it that exact name matches a line of text in the text doument. Lines are paragraphs with the normal Unix delimiters I think (not sure how it’s done in RTF).
Final dialog box will show a list of all matched filenames and total number of files dropped on the AS app.
My biggest question is, should I try to do this via TextEdit’s AS dictionary, or is there another way I should be thinking about?
I could insist that the text doument be plain text instead, if that makes it much easier.
Thanks in advance.
—— Jim Weisbin, email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden