Help renaming a file

I am struggled all day with examples in this forum, but can’t get the name of this .zip file to rename. I am trying to rename a file that looks like to I am sure this is easy for everyone, but I can’t get it just right.

this is what I have right now.

property theChosenfolder : “Macintosh HD:users:Rupert:desktop:baird:customers:tracy:”

On renamefile(theFile)
tell application “Finder”
set the_file to (theChosenFolder as string) & “” as alias
set name of theFile to the_file
end tell
end renamefile


A couple of things:

  1. the “U” in “Users” needs to be capitailzed
  2. you have an extra colon (after “tracy” and before “Proofs”)
  3. “name” is just the name, not the path


set the_file to choose file
set the name of the file to “”

set theFile to “Macintosh” as alias
set the name of the file to “”