3

In Windows when you're in File Explorer, you can right-click anywhere and create a new item of various types (there's then a submenu option to select which type: text file, ZIP file, etc., just to name a few). In Finder there seems to be no such option. I imagine the expected workflow on Mac would be to open an Application and create a new file from within the application, then save it. But I sometimes prefer this alternative workflow of creating a blank file first, and then opening it as the entrypoint into the application.

Is there some way to configure Finder to add a right-click option to create new, empty files?

soapergem
  • 495

2 Answers2

7

1 - Create anywhere on your computer a Source folder with the files you want to use:

enter image description here



2 - Open Automator and create a new service:

enter image description here



3 - Set the Service to receive a folder in Finder as input:

enter image description here



4 - Drag a "Set Value of Variable" action to the workflow:

enter image description here



5 - Save a new variable "Storage":

enter image description here



6 - Now that we have the target location lets clear the memory placing an Applescript action using this code:


tell application "System Events"
    set the clipboard to {}
end tell


enter image description here



7 - Get the file you created using a "Get Specific Finder Item" action:

enter image description here



8 - Copy to the new folder using a "Copy Finder Item" action and dragging the Storage variable from the bottom:

enter image description here



9 - Save your workflow:

enter image description here



10 - Usage - select the folder you want, right click and find your service:

enter image description here



11 - Repeat the process for the zip file or other files you want.



Edit: if you know how to Applescript and want to improve further, you can use a dialog box to choose between several filetypes and build a single service, using a "choose from" command like this:


set fileType to (choose from list {"txt", "zip", "etc"} with prompt "Choose File")

4

You can add Services to Finder's right-click context menu using Automator: create a workflow which you save as a Service, and it'll be available upon right-click.

I know that out of the box you can add create new text file and create new keynote presentation that way, as well as new folder, new folder within folder and so on, but... I think you may need to find more Automator actions for other document types to be able to add a "new type XX file" to your Finder Service.

https://developer.apple.com/library/content/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/MakeaSystem-WideService.html

  • Absolutely, you are correct sir. I am but a fixer, who likes to work around stuff. – Mateus Ribeiro Apr 17 '22 at 23:13
  • I can’t find a way to make my "Services" contextual menu item appear (new file) appear when I right-click inside an empty folder? It only appears in the FInder>Services menu… – Dave Everitt Sep 25 '22 at 12:26