I’m trying to set the filetype/creatortype for some text files, so that they will open in IE. I know that IE’s filetype/creatortype is APPLMSIE, but can anyone tell me what the file/creatortype is for the .htm files that IE opens? Back in the OS9 days, I’d find out via resedit, but now I’m not sure how to find this out.
Here’s a drag and drop app that will return the info you need…
on open fileList
repeat with oneFile in fileList
set allinfo to info for oneFile
set isFolder to allinfo's folder
set fileName to nameFromPath of (oneFile as string) ¬
given isFolder:isFolder
if fileName is not "" then
if isFolder then
display dialog "?" & fileName & ¬
"? " & return & "" & return & " Your Selection, is a Folder " & return & " This Application is Intended for Individual Files" & return & " Drop a File, Not a Folder" buttons {"OK ?"} default button 1
else
set details to return & "Creator: " & ¬
allinfo's file creator & return & ¬
"Type: " & allinfo's file type & return & ¬
"Size: " & allinfo's size & return & ¬
"Created: " & allinfo's creation date & return & ¬
"Modified: " & allinfo's modification date & return & ¬
"Version: " & allinfo's long version
display dialog "Info for the File: ?" & fileName & "?" & return & "" & details ¬
buttons {"Mostly Cool"} default button 1
end if
end if
end repeat
end open
on nameFromPath of thePath given isFolder:isFolder
if thePath = "" then return ""
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to ":"
if isFolder then
set fileName to text item -2 of thePath
else
set fileName to text item -1 of thePath
end if
set AppleScript's text item delimiters to oldDelims
return fileName
end nameFromPath
Hmmm - - - it works in that it provides the size, modified date, and created date, but it doesn’t provide the creatortype or filetype. (those fields are empty)
If you drag a .htm file onto this applet in Mac OS 10.2, does this work for you?
Yes it does Rob, FileType = WAFF and Creator Type = MSIE – Mac OS X 10.2.6
If you have the Apple Developer Tools installed you can use the “GetFileInfo” command in the Terminal app to retrieve the info.
/Developer/Tools/GetFileInfo
Be sure to leave a trailing space after GetFileInfo, then drag and drop the file in question into the Terminal app’s window.
Rob, if you have the Apple Developer Tools installed you can use this Drag & Drop Applet to return a files attributes…
on open the_item
set this_item to (quoted form of POSIX path of the_item)
do shell script "/Developer/Tools/GetFileInfo " & this_item
display dialog result
end open
Credit sjschultze for his work on his Droplet. I kinda snagged his method ;¬)