tell application "Finder"
set OriginalSin to the insertion location
set Man to a reference to the parent of OriginalSin
set Lord to a reference to the parent of Man
if not (the Lord exists) then return "Dawkins was right."
set the Shadows to make new folder at OriginalSin ¬
with properties {name:"___EVIL___"}
move the selection to the Shadows
set Worthy to a reference to every file in the Shadows
set the name extension of the Worthy to "god"
set Forsaken to the name in the Lord's files
set Righteous to the Worthy where its name is not in the Forsaken
move the Righteous to the Lord without replacing
move the Worthy to OriginalSin
delete the Shadows
end tell
Я бы не использовал «бог» в качестве имени расширения, он не распознается системой как известный тип файла.На самом деле, рассмотрим , почему вы хотите изменить расширение файла вручную, что, помимо простого текстового файла, я не могу вспомнить в ситуации † , где это было бы необходимо.macOS использует расширения файлов, чтобы помочь определить тип файла и связать их с соответствующими приложениями, которые больше не смогут выполнять функции открывателей для файлов, которые вы изменяете.
† На самом деле, "e" в ".jpeg" действительно заслуживает смерти