I am trying to rename a file. I started with the following code.
tell application "Finder"
set dtFilePath to (path to the desktop folder)
set originalFile to ((dtFilePath & "Picture 1.png") as string) set newFile to ((dtFilePath & "MakeMeASandwich!.png") as string)
set name of file originalFile to newFile
end tell
Looking thru the forum I have not found any reason that this shouldn’t work. I know that the “Picture 1” file exists, it is created earlier in the script (and I have verified this as a stand alone) but the finder give an error that it can’t complete the operation.
Thanks
Dee