Re: changing the "open with application" value for a file
Re: changing the "open with application" value for a file
- Subject: Re: changing the "open with application" value for a file
- From: Jim Brandt <email@hidden>
- Date: Sat, 23 May 2009 13:04:22 -0500
OK, so where do the types come from?
Back under OS 9, there were programs to show and change
the creator type codes. You didn't need to know the code, the
program looked it up.
If I look at the downloaded file with an extension of .m4v, on my
machine, it will, by default, open up in iTunes. The kind shows
as "MPEG-4 Video file".
If, using the "get info" dialog, I change the application which opens
the file, it still has a qualifier of .m4v, the creator type still is
undefined,
but the kind is now "MPEG-3 Video" (missing the " file").
Does that imply that every application has assigned to it a unique
"kind"
in a similar way that the application used to have a creator type
under OS9,
and, if so, how does one go about discovering what "kind" is associated
with a given application?
Obviously, it's more than just the qualifier that makes the
determination
of which application opens the file since .m4v can be opened by both
iTunes and Quicktime player. There is no file type or creator type
associated with the file either before or after I've gone through the
"get info" dialog, so is it then the "kind" property?
Thanks for the quick reply.
Jim
On May 23, 2009, at 12:35 PM, email@hidden wrote:
I am downloading multiple files that are ".m4v" type videocasts.
By default, on my machine, they would open in iTunes. If I use
"Get Info" for each file, I can tell it to open in Quicktime
instead. When I look at the properties for this file, neither
the file creator or the file type is filled in.
I realise the file type is the old OS 9 4 byte code that was
unique to each application and could be manipulated to force a
particular program to open a file when it's icon was double
clicked.
Same thing, plus, if that information is not there, it uses the
file extension.
Here's how to get and change those settings.
set myFile to choose file
tell application "Finder"
set myType to file type of myFile
set myCreator to creator type of myFile
set myExtension to name extension of myFile
set file type of myFile to "1234"
set creator type of myFile to "ABCD"
set name extension of myFile to "abc"
end tell
This is the kind of thing you could write a droplet to handle or a
folder watcher.
HTH,
ES
_______________________________________________
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