Right click > new File, when?

Is it possible to do right click > new file in mac ?

I found that I could do right click > new Folder, but I can't find this for the new file.


I found a trick: open a terminal, and type "touch myfile.txt", but it takes longer.

Is there a fastest way to do so?


Thanks.

I'm on MacOS Mojave by the way.



iMac 27", macOS 10.14

Posted on May 6, 2019 10:11 PM

Reply
Question marked as Top-ranking reply

Posted on May 7, 2019 3:46 AM

You create new files in an application - text files in TextEdit, Word documents in Word, etc.


In most cases it is trivial to do so: just press Command-N (just as you would in Windows, except that there it would be Control-N).


If you want to be able to create an empty file right there in the Finder, it is possible to do so - though I really don't understand the purpose. Just create a little Automator "Service". You can even add a keyboard shortcut, if you like. It would not be control-click->New File, but control-click->Services->New File. Again, I don't see the point, but it can be done easily.

32 replies
Question marked as Top-ranking reply

May 7, 2019 3:46 AM in response to lingtalfi

You create new files in an application - text files in TextEdit, Word documents in Word, etc.


In most cases it is trivial to do so: just press Command-N (just as you would in Windows, except that there it would be Control-N).


If you want to be able to create an empty file right there in the Finder, it is possible to do so - though I really don't understand the purpose. Just create a little Automator "Service". You can even add a keyboard shortcut, if you like. It would not be control-click->New File, but control-click->Services->New File. Again, I don't see the point, but it can be done easily.

May 8, 2019 5:45 AM in response to lingtalfi

In Finder, I can copy a file named myFile.md, paste it, and rename it as my_new_idea.md. Given that, isn't there an obvious missing shortcut here? Directly being able to create my_new_idea.md?

No. But, you could easily create that workflow in Automator.


How does Apple know how to create a Word document or an Excel Spreadsheet, or any other proprietary file format.

All developer's can create Services that can be embedded within the app. They should just provide the service since they know how to create their own file format.

May 6, 2019 11:33 PM in response to Kappy

Thanks for your reply, but again, I disagree.

I don't think creating a file is complicated at all, and that it can crash the system, because as I said, if you open a terminal, you can actually create a file where you want and with the name you want, and it will never crash the system (afaik), using the "touch" command.

Now there are so many cases where I need to create a file that I cannot list them all here.

But basically, I'm a web developer, and every day I need to create some files here and there, sometimes just to create a quick first draft of a file that I'm going to rework later in another format, sometimes because I create new file extensions for the purpose of web development (when I create my own tools which work with my own file extensions). Also, there is this format called markdown (extension=.md), which is the file extension I probably use the most. Sometimes I need to create a small php script ( ".php" extension).


Now the appications I'm using the most are phpStorm (an application to write code in php language), and sublime text, to create quick text files when I need to store any kind of information.


In fact, I don't like Apple native applications like "text edit" to edit text for personal reasons (I have nothing against apple products, but I have specific criterion that make me prefer some softwares above others, like everyone else I suppose).



The problem with an application, as I see it, is that you need to open the application, and that takes some time.

In the case of phpStorm, it takes 20-25 seconds. In the case of sublime text, it takes 1 second.

But once it's open, it's not over, you need to go to file save and then only you have the prompt which asks you for the file name, and then finally you can save your file.

So, in other words, if I want to create a quick text file (for instance because I want to type a mail rough text before I send it to an important client), it would take me (with Sublime text) about 5 or 6 seconds.


Whereas if I could create it directly with a right click, it would take me 2 seconds.

Plus, not all applications can create all types of files.

As I said, I create a lot of files during a day, so at some points saving 3 or four seconds per operation becomes a big deal.

I'm talking optimization here, obviously.

And as far as optimization, I really believe that mac should give the users the ability to create a file (that's not a complicated operation, believe me) where they want, without having to resort to 3rd party tools.


I wonder how many people miss that simple feature.

Maybe not you (I don't know why you don't need that feature by the way), but I'm pretty sure there are tons of people like me, which need this shortcut.


I can only hope that one day, Apple will add this to their OS, that wouldn't cost them much, but that would be useful for a lot of people. Just imagine if there are 2 millions of people like me, which save about 4 seconds per operation, and they do like 10 operations per day. This means one user saves 10 x 4 = 40 seconds per day, which means for 2 millions users 2 millions x 40 = 80 millions seconds saved per day at the world level, which means 80000000/86400 = 925.92 days of work saved every day.

That's a lot.


Apple should do a survey, and they would see that I'm right (I bet I'm right at least).




May 7, 2019 2:54 PM in response to lingtalfi

You give the example of creating a file for a mail message. You create the file. What have you done? You have not completed the task. You need to open some editor to fill in the data. You need to compare the completion of the task not getting some file on disk.


suck it up and get a third party utility to do what you want. Problem solved.


I use keyboard maestro to do this sort of thing. You can speed up your computing by assigning function keys to apps. I have f2 to mail, f4 to Waterfox, f8 to textwrangler/bbedit, etc. On the macos, if the app isn't opened it's openned. If its hidden, the app is brought to the front. So, I can always press f4 to get my favorite web browser.


I do use touch and mkdir for debuggin. I don't use these otherwise.


R

May 8, 2019 4:14 PM in response to lingtalfi

My whole point is to say that it's easier to do right click > click than investigate into Automator.

That's what you set up in Automator. A right-click Service.

Apple doesn't have to do anything except creating the file (like the touch command does in your Terminal, when you do touch touch my_image.jpg, or touch my_album.psd, or touch my_list.csv, ...): it just needs to create the file.

Give

touch MyExcel.xlsx 

in Terminal a try.

Or,

echo "Hello Word" >> MyWordDoc.docx

Then try to open the resulting file.


Word does open an empty file. But Excel won't.

You would likely get the same result from other apps and file formats.

So, yes, Apple would have to do something and would also have to maintain the actions when a developer's changes their file format.

You can make your own Quick Action to create an empty text file, as I mentioned before.

May 9, 2019 5:13 AM in response to Barney-15E

The feature I'm talking about: "Right click > new File" would basically just prompt you with a dialog to create a new file in the current Finder directory you are in.


There is nothing broken here.


Now if you open the file, which is not the feature I'm talking about, that's another problem, which is off topic.

But just for the sake of going in your sense, if this was breaking anything, they wouldn't even implement the rename feature, and yet the "Rename" feature is just an item in the Finder right click menu (when you right click a file or a folder).


So there is nothing wrong or breaking in renaming or creating a file.

Every OS has this feature, windows users have that in the graphical user interface, whereas in Mac, unfortunately for users like me, it's a little more deep (i.e. you have to open a terminal to create a file, or resort to Automator or other 3rd party software).







May 7, 2019 4:05 AM in response to Barney-15E

Thanks. As far as I'm concerned, I've already implemented the work around for myself.

I guess I just needed to cry somewhere.

Thanks all for giving me a shoulder to cry on, and try to provide solutions.


(by the way, I'm sorry to have promoted this post as Solved, I meant to promote Barnet-15E post as the accepted response, but seems I was too fast, and now I cannot undo)


May 6, 2019 11:06 PM in response to lingtalfi

You use applications which create their own files. There is no need for creating empty files. And, creating a file is somewhat complicated. If not done right it can crash the system. The macro or utility can always be attached to a menu that is accessible via a right click, but given your obvious expertise you should know that. What I would like to know is why do you need to create an empty file? Why not let the app you will use with that file create it? Files need app associations which are provided by the app that uses the file.

May 7, 2019 3:57 AM in response to Luis Sequeira1

Well maybe you don't see the purpose of creating files from the Finder, but as I said, I do.

So I understand that you don't see why this would be useful, but if I'm posting this message, it's that it really is something I need.

I actually did the Automator script, and now I have the Automator icon in my Finder and I can create a file by just clicking on it.

But my point is that in the future, there will be other users like me who wants this feature, and they would be frustrated as I was.


Now creating a "little Automator" script as you said can take easily 10 minutes if you don't know what Automator is in the first place.


So, to me, it would make more sense that the Finder app has this shortcut right out of the box.

If that's so easy to do, why doesn't Apple include it directly in the right click menu?

As I said, at least I need this (I get that you don't need that, but I do), and what harm would it cause to other users like you (or anybody who doesn't need this feature) to have one extra item in the menu?


You know, they should just add it, that would be simpler for everybody.









May 7, 2019 8:44 PM in response to rccharles

Oh yeah? Well suck it up too and use third party utility too.

For the mail message, that's because I'm used to use the keyboards shortcuts a lot, and one of them in PhpStorm is cmd + D, which duplicates the line, whereas in Mail, cmd + D will actually send the mail. Sometimes my brain gets mixed up being software, and using phpStorm 90% of the time I'm used to duplicate lines and change them (it's just often faster than copy/pasting), and so guess what: I've often sent non-finished emails, sometimes to professional clients, makes me look like a fool. And so when it's important, I prefer to first store the mail content in a file, I read it until I'm satisfied, and then when the whole message is ok, I paste it in email and send it. Same with webforms which don't work: sometimes you fill a long message, and the webserver tells you that there was an error, and you have to type the message content again.

So what have I done, I have saved myself some precious time (in some cases), and in the case of web forms, I've secured my message (basically the effort that I've put in the wording of my message was saved).


Now back to the discussion: as far as I'm concerned, the problem will only be solved when Apple fix the problem.

Just listen to yourself: you think it's normal to install a third party tool, just to create a simple file where you want?

Well if I'm being honest, that's a usability problem, or at least there is room for improvement here.




May 7, 2019 11:31 PM in response to lingtalfi

In fact, I secretly hope that Tim Cook (the current CEO of Apple) reads this discussion (hence I mentioned his name) and balance out the pros and cons of implementing such a feature, and do something about it (I believe he's one of the few people who can actually do something about it).


I have two arguments for him:


  • In Finder, I can copy a file named myFile.md, paste it, and rename it as my_new_idea.md. Given that, isn't there an obvious missing shortcut here? Directly being able to create my_new_idea.md?
  • Then I will argue that if this feature is implemented, it won't harm other users. For instance, personally I don't use tags a lot, but I don't mind having them in the Finder right click menu, because I know that maybe one day, when I'll need them, they'll be there. They just take some space, but I prefer to have them than not, because I have more options, and it's potentially useful. So, I believe that users won't bother if they have a "New File" item that they don't use in that menu.


That's it. When I first bought an Apple, I remember that I liked that Apple was about simplicity.

And I also remember that the first time I tried to create a file on the desktop (which was the very same day I bought my first Mac) this was my first frustrating experience with Apple. That's a very little annoyance compared to all the good stuff the Mac offers, sure, but it's so simple to fix, and by fixing all little things, you get a perfect OS.


So, fingers crossed, please M. Tim Cook do something about it.






May 7, 2019 11:38 PM in response to lingtalfi

FYI: These are user-only forums. Apple is not here. Tim Cook will not help you. Thank you for your understanding and support. Should you need further help: Contact Apple Customer and Support Service.


  1. Apple Store Customer Service at 1-800-676-2775 or visit online Help for more information.
  2. Primary support help at Contact Support.
  3. To contact product and tech support:  Contacting Apple for support and service including international calling numbers.


May 8, 2019 6:23 AM in response to Barney-15E

My whole point is to say that it's easier to do right click > click than investigate into Automator.

Apple doesn't have to do anything except creating the file (like the touch command does in your Terminal, when you do touch touch my_image.jpg, or touch my_album.psd, or touch my_list.csv, ...): it just needs to create the file.


Then when you open the file, that's when Apple needs to decide which application is better suited to open that file, and afaik they do that based on the extension. Then if you create a fake image for instance (touch my_image.jpg), then the app for that (Preview by default) will complain.

But obviously if you create a file, you don't create fake jpg files, because the code is binary (not human, too complicated to do by hand), but for text files, md files csv files, basically all simple text based files, it will work just fine.


I'm telling you that it's something that I need, that's personal, but it's just like that. I get that you don't understand what I'm explaining, but it doesn't change the fact that I and some other people miss this feature, and I believe this is on Apple.

They need to fix this (i.e. not you or anybody else in this discussion I guess), and until they don't, I will be sad and angry on that particular point, that's all.


I think it's useless to debate now, some people don't see the point of right click new file, some others do, that's all.









This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Right click > new File, when?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.