Hi all,
I am trying to run through a directory of HTML files and append HTML at the end of the text file. I am using textwrangler as my text editor.
set theFolder to ("Macintosh HD:Users/winter/Desktop/HTMFILES/")
tell application "Finder" to set theFiles to files of folder theFolder whose name extension is "html"
repeat with oneFile in theFiles
tell application "TextWrangler"
open (oneFile as alias)
add suffix text of document 1 suffix "<p>My footer disclaimer...</p>"
close document 1 saving yes
end tell
end repeat
but when I run this, i receive the following error:
error “Can’t make «class docf» "Active.html" of «class cfol» "RMI" of «class sdsk» of application "Finder" into type alias.” number -1700 from «class docf» “Active.html” of «class cfol» “RMI” of «class sdsk» to alias
I am new to applescript and would appreciate some direction.
Thank you