• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: .chk files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Fwd: .chk files (From: "Jordan Hadley" <email@hidden>)
 >Re: .chk files (From: Paul Scott <email@hidden>)

  • Prev by Date: Re: GUIscritpting, Pages and PDF
  • Next by Date: Re: built&released application not functioning on other Macs..
  • Previous by thread: Re: .chk files
  • Next by thread: Re: .chk files
  • Index(es):
    • Date
    • Thread