open files in a folder and in that folder's subfolders
open files in a folder and in that folder's subfolders
- Subject: open files in a folder and in that folder's subfolders
- From: "Kinsella, John R." <email@hidden>
- Date: Thu, 27 Feb 2003 14:33:03 -0600
List
I have a script that starts out in the following manner,
tell application "Finder"
set rootFolder to ,
choose folder with prompt "choose your folder"
set rootFolder to folder rootFolder
set filecount to the (count of files in rootFolder) as integer
try
repeat with i from 1 to filecount
set this_item to file i in rootFolder
--display dialog this_item
set openItem to this_item as alias
set docItem to this_item as string
tell application "TextEdit"
activate
if exists document 1 then
close document 1
end if
open openItem
perform replacements
...Script continues...
Basically, it looks in a user defined folder, opens all the files in that
folder one at a time and does some text manipulation using text edit. What
I'm wondering is if anyone has some ideas how I could modify it so that it
will scan not only this user defined folder but also any subfolders in that
folder. My efforts have failed so far and I'm betting I'm just missing
something simple to make it work. Any suggestions would be greatly
appreciated!!
Also, it'd be really cool if I could define to the script to only open htm
or html files. Any idea's on that also would be great.
Thanks!!
John Kinsella
IRT-CS
University of St. Thomas
-------------
"The surest way to corrupt a youth is to teach him to hold in higher regard
those who think alike rather than those who think differently."
--Nietzsche
View my Work Calendar at
http://ical.mac.com/ijohn/Work <
http://ical.mac.com/ijohn/Work>
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.