I can change the file locking ("read only") status in a file's context menu:
There's no menu item for this.
How can I create a Finder (context) menu item to set, remove, or toggle this flag more quickly?
You can create a new menu item that does that by creating a Service that receives files and folders as input in any application in Automator.
You have two implementation options. Choose one of the two Automator actions to build the Service workflow with:
The code below implements the Toggle command, as it's the most complex.
Run Shell Script
This variant uses
Use the following bash script code snippet as part of the Run Shell Script action:
Configure the action to receive input as arguments.
Use the following AppleScript code snippet as part of the Run AppleScript action:
If the action fails, e.g. because permissions are missing, one dialog is displayed per file that failed to be changed.