Cannot rename file by changing filename case

If the filename of the file is noting.txt, I cannot rename it to Noting.txt at the same folder. The message on log console is
"File action failed because destination already exists /Users/admin/Desktop/Noting.txt In macro “Trying” (while executing Move or Rename File “~/Desktop/noting.txt”)."
But in finder in real world, I can select the file, press enter, then type "Noting", then press enter. I don't know why I cannot do this with rename macro in KM.
Hope someone help me.
Move, Copy, or Trash a File.kmactions (422 Bytes)

As a workaround, this should work:

___tmp <4CE3 200309T123549>-pty-fs8
___tmp <4CE3 200309T123543>.kmmacros (2.1 KB)

Or for making one or more Finder-selected files uppercase first:

Selection: Uppercase-first file names <E320 200309T145944>-pty-fs8
Selection: Uppercase-first file names <E320 200309T145944>.kmmacros (2.1 KB)

OT: I think your screen is melting

thank you for reply. I find Using applescript doesn't have this issue.
Screen Shot 2020-03-10 at 11.48.11

But now I have three methods to do this job. Thanks.

1 Like

The two files are the same, since the file system is case insensitive, and Keyboard Maestro explicitly prohibits moving/renaming a file on to an existing file for safety, so you can't rename it.

You would have to rename it to something else and then rename it back.

2 Likes