cfol error problems

Hi, can someone tell me what is going on here: I have the following script on my computer

property EPS_Backup_Folder : alias “Jobs for Preflighting:EPS Backup:”

on open thefiles
repeat with thisfile in thefiles
tell application “Finder”
set pathname to thisfile as alias
set the_file_name to thisfile as string

		set pub_date to word -5 of the_file_name & "-" & word -6 of the_file_name
		
		
		if folder named pub_date in folder EPS_Backup_Folder exists then
			move thisfile to folder pub_date of folder EPS_Backup_Folder replacing yes
		else
			set pub_date_folder to make folder in folder EPS_Backup_Folder
			set name of pub_date_folder to pub_date
			move thisfile to folder pub_date of folder EPS_Backup_Folder replacing yes
		end if
		
	end tell
end repeat

end open

when I shift it to another computer running the same OS) “folder” changes to <>. What causes this? Also, when I try the following basic script;

tell application “Finder”
make new folder at desktop with properties {name:“test”}
end tell

it works on my computer but gives the following error on the other one:

“Finder got an error: Can’t make a folder”

Anyone know why this is happening? I can make a folder using the Finder on this computer otherwise
Thanks!!

Hi. I can’t see why you’re getting the error you’re getting, but here are a few observations you could check out. The line above will only work on your own computer. Make the property a path (string) only and put ‘alias’ (or ‘folder’ here) in front of it in the running part of the script. Both computers should have access to a disk or volume called “Jobs for Preflighting”.

(‘thisFile’ is already an alias - but you don’t use the ‘pathname’ variable again anyway, so it’s doubly superfluous.) Your nomenclature’s a bit confusing. When ‘thisfile’ is coerced to string, you get the full path to the file, not just its name. But it shouldn’t make any difference in the following line:

… provided that there are at least six words in the actual name of the file and that all systems running the script have the same nationality (and thus the same understanding of a ‘word’).


«class cfol» is just the internal code behind the Finder’s ‘folder’ keyword. You’ll see it in that form when you don’t have a script editor running to decompile it for you. It’s normally nothing to worry about. But if it appears that way in the script editor on another machine, it could mean that the Finder’s not running on that machine or that there’s some problem with it.

That should work. It would fail if there was already a folder “test” on the desktop, but I’d expect a different error message. (I’m not on my OS X machine at the moment.) Is the Finder actually running on the other machine?

Thanks for your advise - the script works perfectly for what I’m doing - it’s only a chunk of a much larger script to use as an example - the problem is the applescripts reverting to class names when I shift them to a mac mini e.g., <>

It’s doing it in the Script Editor and the Finder is running

No, there’s no other folders on the desktop - I’m starting to think it’s the new computer, I might try formatting it and reinstall the OS. Thanks for you comments tho…