Automator Newbie question - Can this be done?

thomasp

macrumors 6502a
Original poster
Sep 18, 2004
654
1
UK
Hi,

I have never used Automator before, and would like to know if I can use it for the following:

I have about 200 .html files, edited in TextEdit as a text file (not RTF) and saved with the .html extension. About 80% of these files have a short line in them (identical in all files) that needs replacing with a different line (will be the same for all files).

Can Automator check all 200 files for this line, replace it with the new line and then resave the text files with exactly the same filename and extension?

If so, how can I do this?


Thanks for the help :)
 

mkrishnan

Moderator emeritus
Jan 9, 2004
29,776
12
Grand Rapids, MI, USA
Actually, I would think it should be possible in Automator too, but I don't see a really easy and non-messy way to do it, because I don't see an action for find/replace in TextEdit, and come to think of it, this isn't a feature in TextEdit. :eek: I think that will make the Automator approach very difficult. :(
 
Comment

thomasp

macrumors 6502a
Original poster
Sep 18, 2004
654
1
UK
mkrishnan said:
Actually, I would think it should be possible in Automator too, but I don't see a really easy and non-messy way to do it, because I don't see an action for find/replace in TextEdit, and come to think of it, this isn't a feature in TextEdit. :eek: I think that will make the Automator approach very difficult. :(
There is a find/replace in TextEdit - Edit Menu --> Find --> Find... --> Click "Replace"


I'll check out that TextWrangler - thanks for the link :)
 
Comment

Mitthrawnuruodo

Moderator emeritus
Mar 10, 2004
13,813
183
Bergen, Norway
thomasp said:
There is a find/replace in TextEdit - Edit Menu --> Find --> Find... --> Click "Replace"

I'll check out that TextWrangler - thanks for the link :)
I think he meant Automator actions, where find/replace, for some insane reason, is not among the actions Automator "inherit" from TextEdit.

But, if you download and start using TextWrangler, you never have to use TextEdit again (except for opening rtf/doc files, but for text files you now have a better application... much better... ;))
 
Comment

mkrishnan

Moderator emeritus
Jan 9, 2004
29,776
12
Grand Rapids, MI, USA
thomasp said:
There is a find/replace in TextEdit - Edit Menu --> Find --> Find... --> Click "Replace"


I'll check out that TextWrangler - thanks for the link :)
Ahhh, okay, I didn't click on it just then and hadn't remembered using it... I don't edit much in TextEdit -- I usually use Word for complex documents. :eek: Although there still doesn't seem to be an easy way to access this feature in Automator....

Anyway, hope that TextWrangler works out for you. :)
 
Comment
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.