Type and Creator

Hi everyone! Here after doing this problem of mine more than once I have amost exhausted myself trying to find out why this is not working…

tell application "Finder"
	set thePath to (choose file)
	set curFileCreator to file creator of thePath
	set curFileType to file type of thePath
end tell

All I want to know is the file type and creator of some files so I can set all of them thru a script.

Thanks!
Krazay :rolleyes:

Hi,

‘file creator’ is a label used in the record returned from the ‘info for’ command. The Finder uses ‘creator type’.

gl,

Thanks kel,
But when I try this applescript it goes into error…

tell application "Finder" 
   set thePath to (choose file) 
   set curFileCreator to file creator of thePath 
   set curFileType to file type of thePath 
end tell 

Applescript Error
Finder got an error : Can’t find creator of alias (what ever path I choose)

So strange… I thought I able to do this before with this problem.

krazay

I tried the above and it errored out the same way. When I went back to my script it highlited file type. This use to work a while back with no problems.

Krazay

Hi,

Maybe you should show your script and the error message. Your posts don’t sound right.

gl,

tell application “Finder”
set x to get file type of (choose file)
set y to get creator type of (choose file)
return x & space & y
end tell

AHHHHH! This is really weird. I have my home folder encrypted and I just tried the same code in another user, and it works… why does this not work in an encrypted enviroment?

probally because for lots of files, or to make new files, you have to give it an administrator password and you didn’t tell it the admin password.