finding File Type

I know this has probably been asked/answered many times over, but I’m having problems finding the answer.

I’m going to be processing a folder full of EPS files (the will not have the actual .eps extension). I need to find out if they are Photoshop EPS or Illustrator EPS. Hopefully they will have a different 4 digit code, but I don’t know how to find out.

Thanks

Hopefully something like this will help:

choose file without invisibles
return file type of (info for result without size)

Is this Tiger-only syntax? I’m having no luck

It’s quite possible that your files don’t have a file type code specified, in which case that script will return an empty string (“”).

I got this to work, turns out the file type was the same regardless, and had to also find the creator type

set file2Info to (choose file with prompt "choose one")
tell application "Finder"
	set thisType to file type of file2Info
	set thisCreator to creator type of file2Info
	display dialog thisType & thisCreator
end tell