Safari

Hi,

Firstly, It is not good to just place everything in a big Finder tell block like that. Sometimes there will be confusion because the target of a command or property will see keywords that are used in the target and error. In your script the first target is the Finder. If I where you, I’d place everything that doesn’t deal with the Finder, out of the tell blocK. Sometimes it doesn’t matter, but it is a good practice and will eliminate many errors.

Edit: then after I’ve done this, I can more easily pinpoint my errors.

gl,

Parts One and Two of your script work fine for me in Jaguar — provided that a “User Presets” folder exists in the currentVersion folder. If it doesn’t, I also get a “Can’t get some object” error at that point.

If you’re fully replete with “User Presets” folders and the script’s still not working, you could try looking at the form of the repeat loop. When you have a repeat in the form:

set new_folder_names to {"Folder1", "Folder2", "Folder3"}
repeat with name_ in new_folder_names

… the value of name_ isn’t a string like “Folder1”, but a reference like ‘item 1 of {“Folder1”, “Folder2”, “Folder3”}’. This might just cause problems if trying to use it as the ‘name’ property when making the new folder. It works perfectly well on my own machine, but it’s worth checking out.

repeat with name_ in new_folder_names
  set name_ to name_'s contents -- get the 'contents of' the reference

Relying on the returned order of the version folder names to get the “latest” one will probably be OK so long as none of the version or sub-version numbers go into double figures. If they do, they may not be presented in the order you’re expecting.