Create new file in Finder

We can write an AppleScript to open terminal in the current folder location of the Finder.

Option 1

Add an option in the Services for this task.

Steps:

1) Applications>Automator>Service>

2) Service receives selected [no input] in [Finder]

left panel select "Run AppleScript" -> drag and drop on the right blank space.

3) copy and paste this line:

tell application "Finder" to make new file at (the target of the front window) as alias

4) save filename as "NewTextFile"

Then open any Finder, rightclick -> Services, you can find option of "NewTextFile".

The terminal open will be in the current folder of the Finder.

Option 2

We can also save the AppleScript above, and then add the script to the toolbar of the Finder.

Steps:

1) Applications> Utilities > Script Editor

2) copy and paste this line:

tell application "Finder" to make new file at (the target of the front window) as alias

3) save filename as "NewTextFile". You can save the script at any place, but it is recommended to save it in the Script folder in Applications. (You have to create the folder if it doesn't exist.)

4) cmd + drag the file icon to the toolbar. And you will be able to see the icon in the toolbar and use that script to open terminal at that location.

5 ) To remove the added icon, right click > customize toolbar... > drag the icon you want to remove to outside of the window.

Reference:

https://superuser.com/questions/14118/easiest-way-to-create-a-new-text-file-in-a-finder-window-on-osx