Creating Files/Folders With Nautilus in List View

9

1

When Nautilus is in list view (more like treeview) when I right-click on a Folder, there's no option to create a File/Folder. When I right-click on a file within the folder, it also gives no option to create anything.

How do I create Files/Folders when viewing Nautilus in List View?

RyanScottLewis

Posted 2009-10-25T19:57:47.810

Reputation: 1 096

Answers

16

Actually the problem is the absence of 'white space' in nautilus in list view. On a windows OS, either list or detailed view you must click (right or left click) on the folder or folder name itself. So simply by moving the mouse to the right a little you can right click on white space and easily get to the 'create folder' option. In nautilus, the entire window is split into rows and columns, and clicking in any row will select the folder. So if you have more files than can be shown without scrolling, your sunk. This actually really ticks me off. This is a bug that should have been fixed years ago.

yeah___right

Posted 2009-10-25T19:57:47.810

Reputation: 176

It would be soo easy to solve by just putting this option into the context menu. Seeing that this question is almost 10 years old, I really cannot understand why this hasn't been done. – some-non-descript-user – 2018-07-09T06:37:27.897

1Yes! This is exactly the problem I'm talking about. I just know so little in the way of C programming and Gnome to actually go though the source and fix it. =/ – RyanScottLewis – 2010-12-13T19:05:08.203

5

when I right-click on a Folder, there's no option to create a File/Folder

As far as I know this is normal behaviour since the menu is requiring you to take action on the folder itself. However if you right-click outside of the folder structure you will get the "Create Folder" menu.

If you have a folder selected you can still create a new folder by going to the File menu and selecting "Create Folder" or by pressing Shift+Ctrl+N. After you have created the folder you could just drag it into the parent folder.

I understand what you want to accomplish but as far as I know that behaviour does not exist in Ubuntu or any other OS.

ricbax

Posted 2009-10-25T19:57:47.810

Reputation: 4 894

2

In later versions of Nautilus (I am running 3.6) there is a gear icon which allows you to access a directory context menu.

David

Posted 2009-10-25T19:57:47.810

Reputation: 121

1I see that but there's no New File button, just New Folder – Jonathan – 2018-04-07T17:32:00.347

1But later versions of Nautilus also got rid of the list view or any custom view modes for that matter. – Glutanimate – 2013-09-01T01:36:11.693

1

EDIT: In new versions of Nautilus, just press "Shift-Ctrl-N"


In Nautilus (tried with version 3.22), for folder creation, you can press F10 and the space, or click in the new folder button (see screenshot).

The other workaround is to press Ctrl+1 and Ctrl+2 to switch quickly between List and Grid view.

nautilusnewfolder

I agree this is a very annoying problem.


UPDATE: In Gnome 3.30.5, this solution doesn't work anymore because no window-menu has the "New Folder" action. However there are now better options.

1) Deselect any file (with Ctrl-Space) if necessary. 2) Press Shift-F10, and the contextual menu will appear 3) Select "New Folder"

Another, yet simpler option is to

1) Just press "Shift-Ctrl-N" to create a new folder

alfC

Posted 2009-10-25T19:57:47.810

Reputation: 253

How would I create a new file? – Jonathan – 2018-04-07T17:33:26.840

1@JonathanLeaders Sorry, it is a partial solution. – alfC – 2018-04-07T20:12:26.750

@Jonathan as of Nautilus 3.28 (and probably earlier) you can press Ctrl+F10 and even if there is a file selected it will open the context menu for the directory (even in list view). Shift-F10 also works but when no file is selected, files can be deselected with Ctrl+Space byt Ctrl+F10 always works. – alfC – 2018-08-28T02:08:40.880

@Jonathan, in Fedora 29, Gnome 3.30.5 I don't even seem to find the New File option with right click. – alfC – 2019-02-19T23:14:15.097

1

As yeah___right said, this was a bug in nautilus, this bug is now fixed and the fix will be in next version of nautilus (possibly 3.4)

Nelson

Posted 2009-10-25T19:57:47.810

Reputation: 121

It was reopened as a bug https://bugzilla.gnome.org/show_bug.cgi?id=689768

– Jonathan – 2018-04-07T17:36:39.867

Didn't happen... – some-non-descript-user – 2018-07-09T06:39:34.020

0

If your keyboard has the application key (The key that depicts a mouse and a menu), you can use that key to bring up the right click menu. From this menu you can create your new file.

However, if you have already selected a file then this method doesn't work, because the menu that appears won't have the "New Document" sub-menu. You have to find a way to deselect the selected item. One trick I figured out is to select everything (ctrl-A), then invert your selection (ctrl-shift-i). Now nothing is selected, so if you press the application key the right click menu will have the new document submenu.

Scotty Jamison

Posted 2009-10-25T19:57:47.810

Reputation: 101

0

There is a way to create new files while in list view.

The following method uses a cool feature nautilus has to add menu items to the right click menu.

Set up

  1. Navigate to ~/.local/share/nautilus/scripts and create a file called new.

  2. Inside this file we need to add some code that would create a file at that location. You can copy and paste this python script I've prepared. The script will show a dialog that lets you choose a filename and a template from your ~/Templates directory. It supports expected keyboard keys like up, down, enter, and escape, so you shouldn't ever have to use your mouse.

  3. Make your new script executable (right click>properties>permissions>Allow executing file as program)

Now right click on any file (it must be a file, empty space does not work). You should see a new place in your right click menu called scripts which contains your new file option. Go ahead and test it out!

Bonus

The thumbnail seen in the right click menu is the same thumbnail that the real file has... so why don't we change it to get an awesomer right click menu thumbnail. (right click on your new script>properties>click the thumbnail>browse to a custom image to use it). You could use this image or your own.

Scotty Jamison

Posted 2009-10-25T19:57:47.810

Reputation: 101

1This seems so complicated for being able to just create a file, but I'm glad there's a way – Jonathan – 2018-04-07T17:32:49.970

Thank you very much for this. I like the concept. Unfortunately I get the following error when I try to use it: "Argument should be string, bytes or integer, not PosixPath." – some-non-descript-user – 2018-07-09T07:18:48.897

@some-non-descript-user Unfortunetally I am unable to run the code anymore, I can't get tkinter to work, so you can get farther than me. What line number is the problem on? Try putting str() around whatever is causing the problem. – Scotty Jamison – 2018-07-10T04:55:15.220