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?

  • Do you want a specific kind of file? Creating txt file for instance is pretty easy using automator. We can try to mimic the workflow for other apps. – Mateus Ribeiro Oct 24 '18 at 16:50
  • Text and ZIP files are realistically the only two that I need – soapergem Oct 24 '18 at 16:52
  • 2
    OK just give me a moment to build the workflow – Mateus Ribeiro Oct 24 '18 at 16:55
  • It's crazy how Mac's don't have this (yet)... – Edward Dec 7 '18 at 17:12
6

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

You must log in to answer this question.

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