On Sep 14, 2010, at 4:01 PM, tom wible wrote:
For paranoia's sake, I used copy, but I'm sure a set will do the trick.
i've never seen a satisfactory explanation of exactly what a/s is doing in set vs copy...
I was working on this script this afternoon ...
set subFolderList to (get folders of folderRef) -- fast, but sorted in unix order
repeat with subFolderRef in subFolderList
...
end repeat
I wanted it to sort in Finder order, so I changed it to this ...
set subFolderList to (get sort folders of folderRef by name) as alias list -- correct order, but slow
repeat with subFolderRef in subFolderList
...
end repeat
The sort order is now correct, but it is noticeably slower than the original.
Upon reading this thread, I tried using copy instead of set. (It couldn't hurt.)
My script now becomes ...
copy (get sort folders of folderRef by name) as alias list to subFolderList -- fast
repeat with subFolderRef in subFolderList
...
end repeat
It is now fast again! Another reason for using copy instead of set.