The rename function always mentions the first argument even if the issue is with the second one. For example:
rename "file.txt" "directory-which-does-not-exist/file.txt"
if file.txt exists, but directory-which-does-not-exist does not, the error message will say:
file.txt: rename: does not exist (No such file or directory)