0

How can I set up a keyboard shortcut to hide the file extension of each selected file in Finder?

For example, if ⇧⌘E were such a shortcut, I could conveniently press ⌘A to select all files in the folder and then ⇧⌘E to hide their extensions.

1 Answer 1

0

Create a workflow to hide the selected files. Then assign a keyboard shortcut to the workflow.

  1. Run Automator.
  2. Create a new workflow document named Hide File Extension of type Quick Action.
  3. Add a Run AppleScript action.
  4. Set workflow receives current to files or folders in Finder. Replace the script content with:
    tell application "Finder"
        repeat with theFile in (selection as alias list)
            set extension hidden of theFile to true 
        end repeat
    end tell
  1. Save the workflow.
  2. Open System Preferences > Keyboard > Shortcuts > Services.
  3. Assign a shortcut to Files and Folders > Hide File Extension, for example ⇧⌘E.

You may need to run Hide File Extension once from Finder’s Quick Actions context menu before the keyboard shortcut will work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .