1

Coming from the Windows/Ubuntu world I enjoy a lot of macOS things, but one thing that drives me crazy is the lack of new file button in the finder. I know that you are supposed to save the file from the proper application but I hate it.

Is there a Finder plugin (or anything like an Alfred workflow) or an alternative explore manager that have this functionality?

2

I can offer you 3 options:


Option 1.

I think the most popular alternative to Finder is Path Finder and it has the "new file" feature.


Option 2.

If you search the App Store with "New file", you'll find quite a few Finder extensions that do this.

I'd maybe suggest:

  • New File Menu Free
    • You'd probably want to set the template to be Blank Document
  • New File Menu (~$2)
    • I believe the key difference is that the free one only allows one new file item to be added at a time and the paid one allows you to add multiple.

I haven't really tested many of these so I don't know if this is the best one or not.


Option 3.

I've made myself this applescript:

enter image description here

This could be triggered using Alfred or pretty much anything that supports applescripts.

A dialog window will open up asking for filename and when you press enter, new file will be put in the current Finder or Path Finder folder. It is restricted to only proceed if Path Finder or Finder is the active application.


if application "Path Finder" is frontmost then

    tell application "Path Finder"
        set currentPath to the path of the target of the front finder window
    end tell

    makeNewFile( currentPath )

else if application "Finder" is frontmost then

    tell application "Finder"
        set currentPath to (folder of the front window) as alias
    end tell

    makeNewFile( currentPath )

end if

on makeNewFile( currentPath )

    set userPath to POSIX path of (path to home folder)
    set iconfile to POSIX file (userPath & "new-file.icns") as alias

    display dialog "For instance: 
My File.txt, index.html, Markdown file.md" with title "Create a new file..." default answer "" with icon iconfile
    set fileName to text returned of result

    tell application "Finder"
        make file at currentPath with properties {name:fileName}
    end tell

end makeNewFile
  • I see some things wrong with your AppleScript code and while this isn't the place to discuss it, however the biggest flaw I see, and using the info in the picture as the example, is your assumption that by giving a filename a type extension makes it that type of file, which of course it doesn't! Your code creates a zero length file of the name and extension you typed and upon clicking OK, the "Example.rtf" file is not a Rich Text file because it has the .rtf extension and when trying to open the .rtf file created by your code, it errors out with "The document Example could not be opened."! – user3439894 Oct 9 '17 at 17:48
  • @user3439894 Sure. I wasn't really thinking when I wrote the .rtf there. When I wrote that script, I didn't think it was worth it to support anything but file types that start from a blank slate. You a welcome to extend that script if you feel like rtf support is needed. – Joonas Oct 9 '17 at 17:53
-1

The app "Forklift" does just what you're asking for, plus much, much more!

http://binarynights.com/forklift/index

You must log in to answer this question.

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