Params path is a legal path name to the file, folder, or volume you wish to rename.
Action Changes the name of the file, folder, or volume, leaving it in place in the directory.
This also produces an error because it is not legal to use file.rename to change a file's location to a different folder. Use file.move for this purpose. Errors If you supply a file name in path and a folder name other than the one in path in the name argument, an error message is generated. Notes Use this verb to rename a file, use file.copy or file.move to copy or move it.