Move or Rename – not case sensitive?

Hi there,
I'm trying to rename a file from "align.txt" to "Align.txt" results in error (notify on failure).
Renaming from "align.txt" to "Blign.txt" works.
Any hints?

My guess would be that "Align.txt" already exists, but what does the error message say?

If you run that failing macro again, you will find the error message preserved at the end of the Engine.log file.

To find that log file, use "Open log folder" under the "Help" menu.

1 Like

Thanks and yes, thats what the error reports:
"… Action 12426332 failed: File action failed because destination already exists …"

But am I wrong to expect the Move or Rename action should only rename the files selected?

Using KM Version 10.2, MacOS 10.13.6

Please see attached macro image / of course macro can be uploaded too.

Because, as far as macOS is concerned that is the same name. You can see this by trying a quick test. In TextEdit make a new file and and use Save As to save it as "untitled.txt" then use Save As again and try and save it as "Untitled.txt" - you will get the warning "file already exists".

I suppose you could get around this by first renaming to a placelholder name and then renaming that placeholder to the name with the case change.

As renaming files and folders is such a common task I personally use a dedicated file renaming app rather than trying to write a Keyboard Maestro macro to cover all the options. I use A Better Finder Rename and I know others on this forum like Name Mangler.

1 Like

So the action first creates a duplicate of the file, tries to rename it, and then deletes the original file?
I expected it to work similarly to renaming in the Finder when you check the file name box.

Thats a good idea – thanks!
Find attached the adjusted macro's screenshot and the macro itself for those who are interested.

:grinning: Yes, I'm using the app too but only for the more complex requirements including ABFR droplets. My action is intended to be fired from a palette – quick & dirty :wink:

NAME replace ??? with ???.kmmacros (37.8 KB)