Re: .chk files
Re: .chk files
- Subject: Re: .chk files
- From: Sander Tekelenburg <email@hidden>
- Date: Fri, 25 Jan 2008 13:40:36 +0100
At 22:13 -0800 UTC, on 2008-01-24, Paul Scott wrote:
> On Jan 24, 2008, at 8:12 PM, Jordan Hadley wrote:
[...]
>> I read about a Windows data recovery application that looks at the
>> header to determine what kind of file it is, and then changes the
>> extension to match... Anybody know of a way to do that on a Mac?
>
> ImageMagick ( http://www.imagemagick.org ) might do that via do shell.
Or use the built-in file tool:
set P_aFile to POSIX path of (choose file)
set s_aScript to "file -bi " & P_aFile
do shell script s_aScript
set s_filesMIME to result
By default file's output is rather chatty; probably hard to parse reliably.
With the b and i options it only outputs a MIME type (and potentially the
character encoding -- so use a TIDs handler to discard everything from the
semi-colon, if you're free to ignore character encoding).
--
Sander Tekelenburg, <http://www.euronet.nl/~tekelenb/>
_______________________________________________
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