I would not have the choice to restrict characters because of the number of macros (including subroutines) downloaded from the KM library. There is no way I would rename everything.
I find some characters very convenient, for example | for toggle.
A null character is ASCII(0). It is not "\0" but "\0" is how the null character is created in the KM Editor in a text box. The item in the first row&column of this chart is null.
Look at the "Standard ASCII chart" table above. There are 128 characters in the Standard ASCII character set, including 31 "special" characters like "Carriage Return" (13), "Line Feed" (10), "Bell" (7), "Tab" (9) and "Null" (0). Using your eyes, you can read all 31 special character names in the table I offered you above, starting with "Null" and ending with "Unit Separator." (Character 127 in that table, DEL, could also be considered a special character, I suppose. That would make 32 non-visible ASCII characters.)
Any filename containing any of these 32 characters is a file that contains "non-visible" characters. MacOS supports all of these non-visible characters in file names except for "NUL".
If your question is "how do I create a file with non-visible filenames", that's a different question. Every app has its own ways (or some apps may not allow you to create such files.) I'm not sure if KM allows you to do this. Even the macOS shell commands don't make it easy, but you can do it like this:
echo "help" > "$(printf 'help\007file.txt')"
That will create a file with the BELL character (ASCII #7) in the name. If you then display the file names, even the "ls" command won't tell you which non-visible character is there (try it!), but if you do the following you will see the special character displayed as "^G":
ls -l | cat -v
You can create files with names containing any of the 32 non-visible characters in the ASCII table using this method EXCEPT Null.
It was fun. It woke me up. Also, I had a chuckle when you asked me for an "example" of a file with a null character in it. How do I give an example of something that's impossible?
Yes, dropbox is a complete PITA this way. Have had the same issues for years, with an outsource team and tens of thousands of files in dropbox, and also annoying quirks such as the pipe character which is often in drag and drop URLS such as youtube, and the trouble being that it is a dice roll whether the other people using DB have even seen the files. The question "why didnt you work on this folder?" followed by "what folder?" happened more times than you can count...
I have a totally different solution, I use Name Mangler and it can run batch find-replace on file names, with an interface that shows all the found files and folders on the left, so its a snap to just run through the forbidden character list and fix what needs fixing. You could probably create a macro to automate this use of Name Mangler to a single keystroke also - but it only really takes about 2 mins to do manually. Amazing and superfast app.
Glad you both find it useful, and Peter (no, not the KM Peter, but Many Tricks' Peter) and I thank you for the purchase and recommendation. Keyboard Maestro is an amazing app, but sometimes, a focused app can be a nice complement to Keyboard Maestro's broad skill set.
(PS there's an update coming a bit later today with revised help, a new metadata field for photographers, and some minor fixes.)
I am honoured to read a post from a Many Tricks developer ! Are there any plans for floating windows to simplify the drag and drop gymnastics ? Bravo for a great app !
For the record, we are a company of two people, and I am the not developer of the two :). I do all the other stuff.
Nobody has ever asked for it before, so at the moment, "no" was the correct answer :). Now that someone has asked for it, we'll put it on our list of possible future features. In the interim, @kevinb's βP works well, or you can use droplets, or even rename via macOS Services.
@kevinb@griffman
βP works perfectly. To make things even simpler, I tried to write a Finder macro using the variable Finder Multiple Selection β open in Name Mangler, but it does not work.
... works for me. If you have the App Store version of Name Mangler, you'll see an Unlock dialog each time you use it on a new folder, but it should then still work.
very interesting. I based my post on the fact that
select files in Finder β context menu β open with β Name Mangler
does not work
but doing it your way works perfectly.
thank you !
This is due to a limitation in macOS: Name Mangler is set to accept any file, because it can rename any file. But for the Open With menu to work, apps must list a defined set of file types, not "any" file type.
There is a fix, though, because there's a Name Mangler menu hiding nearby, in the Services menu: