Page 1 of 1

Shell menu entry for creating a file without an extension

Posted: 30.05.2018, 21:05
by Forez
I would like to request adding an option for making file-notes via FreeCommander. Because right now it is like this:


I very often make notes in my folders- just a simple single file without content: its filename parameter is the note [info / warning / explanation / instruction / whatever]. I find this modus operandi very efficient [on which I could elaborate] and also extremely simple- thus time saving

Unfortunately: every time I loose some time by repeating the mundane task of removing an extension of such file. Because the steps are:
1] I click right mouse button so that the shell menu would show up
2] I navigate to "New" in the menu
3] I navigate further to the section with file formats
4] I choose a format
5] I write my note
6] I accept it
7] I have to remove the file extension; one way or another

That last point is a total drag- and at the same time it is vital, because only then I get a nice looking file with a distinctive blank white icon provided by the OS. This icon stands so much that there is no way I would not spot it out why glancing through my files. And that also works in the Search window, when going through pint pointed records with the CTRL + F option

[A workaround would be to just choose every time the one and the same fileformat, one of those that I do not use. But that would mean I would have to have an entry for it in my shell menu- and be careful not to make a mistake of choosing the wrong one]


And so I dream of having an option of adding to the shell [via FreeComamnder configuration] an entry for a extensionless file. And if there is not such thing as an extensionless file [in that you Windows will not allow to create one from the get go- but only when renaming an existing one by the means of deleting its extension], then FreeCommander should take care of this [first create the file in for example TXT format and then automatically remove this extension]. This entry for notes I would place right under the entry for Folder creation; so that the list would be: Folder, Note, horizontal splitting line, all of the other entries



I also dream of FreeCommander being able to remove or at least conceal other shell menu entries. I would get rid of the useless Shortcut entry, which since 1995 [Windows 95] I have never used. My shell menu is already pretty cleaned up, but it took me a lot of sweat and time to do so- and in the end I failed with that Shortcut entry

Re: Shell menu entry for creating a file without an extension

Posted: 11.02.2021, 20:58
by Forez
Forez wrote: 30.05.2018, 21:05 I would like to request adding an option for making file-notes via FreeCommander
[...]
I was able to clean my shell menu with others various REG files and pieces of software settings - but I am still miss an option to just right click, go to New and select a creation of an extension-less file [so that I would not had to used instead of that a creation of TXT , after which I have to remove the TXT extension by hand

So maybe a workaround then - in a form of yet another registry hack? Does anyone has an idea how to do this?



I suppose that under the

Computer\HKEY_CLASSES_ROOT\*

there shoul be created a new key named

ShellNew

Becasue the >>*<< apllies in Registry "to all", as I undertand it. Or rather it should be done in

Computer\HKEY_CLASSES_ROOT\Directory\

as the firsy ones applies to right-clicked files? But then what? Or maybe there should be a key >> << in the Computer\HKEY_CLASSES_ROOT\ - thus making a

Computer\HKEY_CLASSES_ROOT\ \ShellNew\

entry? Beause that single pause would somehow tell Windows to not make and extension?

Re: Shell menu entry for creating a file without an extension

Posted: 23.02.2021, 17:57
by Forez
[As discussed here: https://community.mp3tag.de/t/adding-a- ... le/52005/3]


By creating a BAT file like this

Code: Select all

@echo off

echo.
echo Enter the name of the extension-less file that is to be created
echo.

set /p FileName=" >"

echo. >"%~1%FileName%"
and placing it in form of an icon on Favorite Toolbar with a Parameter like %ActivDir%, the user can with a single click evoke a window in which the name for the a can be entered - a file that will be crated in a desired location




So the above works solution works - but the things that I would like to change are:

1] The ability to run this script in any place without the help of FreeCommander - and without the need of coping the BAT to a given folder or opening a folder in which the BAT is already waiting for execution [as this is how it works now without combining it with FC]

2] Addition of the ability to press Esc to close the CMD window. Right now it just deleted all of the entered text - so an ideal situation would be if double Esc would close the window

3] The icon of extension-less files. There probably is a single place in Registry which tells the whole operating system what is the default icon for unknown / unassigned files

Re: Shell menu entry for creating a file without an extension

Posted: 23.02.2021, 21:34
by Karol
Workaround 1:
- Shift+F4 (open editor with new file)
- type file name
- Alt+F4 (close editor)

Workaround 2:
- Shift+Ctrl+N (create emty file)
- type file name
- F2 for removing extension

Re: Shell menu entry for creating a file without an extension

Posted: 23.02.2021, 22:24
by Forez
Karol wrote: 23.02.2021, 21:34 Workaround 1:
- Shift+F4 (open editor with new file)
- type file name
- Alt+F4 (close editor)
Nice

But not neat, as ALT + F4 is not a comfortable key shortcut to be pressed [while Esc is comfortable]

And the initial part of SHIFT + F4 does not work outside FC


Karol wrote: 23.02.2021, 21:34 Workaround 2:
- Shift+Ctrl+N (create emty file)
- type file name
- F2 for removing extension
Not nice

As it is as "convenient" as the original method [of having to navigate to shell sub-menu], because of the removal of extension afterwards, which is a drag

Plus outside FC [i.e. in Windows Explorer] this keyboard shortcut creates a new folder a not a [TXT] file




I guess that the most convenient way would be to store that BAT file on drive C and to be able to evoke it from the [main] shell menu - assuming of course that the script would execute itself in the location when the click would occur

I have stumbled upon some solutions for adding PS1 script to shell menu, so that should be doable - but for now I will not indulge myself in exploring that concept




Or a very convenient method would be to:

have in the shell menu [even burred one level deep in the New sub-menu] an entry for creating of some file - but then in some magical way have the whole operating system be blind to that particular extension, thus resulting in showing and "extensionless" file. In other words: to hide one particular extension by not showing that extension - but at the same time still showing the file with that extension? That would take care the issue of the icon, as I could assign that file [i.e. extension] to be opened in whatever piece of software and have its icon easily changed in the Registry

Re: Shell menu entry for creating a file without an extension

Posted: 23.02.2021, 22:32
by Forez
Forez wrote: 23.02.2021, 17:57 [...]
3] The icon of extension-less files. There probably is a single place in Registry which tells the whole operating system what is the default icon for unknown / unassigned files
That default windows file icon for unknown files is most probably located at

%SystemRoot%\System32\shell32.dll

A tried using various pieces software do get directly to it or it copy placed on some other than system drive


Microangelo Explorer, Microangelo Librarian and Microangelo Studio at even loading that DLL file. Microangelo On Display is able to change that icon "somewhere in the system" [as the chosen icon is nowhere to be found in the Registry] - and unfortunately does this only for Windows Explorer [as for example FreeCommander at the same time still displays the dafault icon]

Resource Hacker loads that DLL but shows no icons in it - at least not in the same ways as "normal" EXE do [all those various ones that I have worked on till this day]

CustomizerGod when trying to replace it [third from the left in the top row in the General Icons] spits an error saying "parameter is incorrect" [plus this https://www.windows10forums.com/threads ... dll.20570/ shows that further down the line it is top level Matrix stuff]

FileTypesMan shows an entry for Folder, Drive, Directory\Background and Directory - but of course not for File. And what is more it shows for multiple entries the icon chosen in Microangelo On Display - but not only Folder, Drive, and Directory it shows [after pressing F2] that the location for the icon is >>%SystemRoot%\System32\shell32.dll,3<<. And changing that location apaprently does nothing

Winaero Tweaker apparently does not take at all notice of this settings of the operting system



I also found info that files

imageres.dll
moricons.dll
powercpl.dll


are supposedly holding more [newer] system icons. But on my Windows these files weight only few KB while that shell32.dll has almost 6 MB - so it cannot be true [at least not anymore on my freshly installed Windows]



And the is also the issue of the doppelganger located at

C:\Windows\SysWOW64\shell32.dll

with all those backup versions - which I bet will overwrite whatever modifications that I will do to this or that DLL with a newer / proper versions of them during reboot or an update of system

Re: Shell menu entry for creating a file without an extension

Posted: 27.02.2021, 11:35
by Odamn-Ete
Have you tried the following?

In the DOS Prompt (if you have it enabled) type the following:

Code: Select all

Notepad "Name of file in quotes"
It should create the file without extension and the name >Name of file in quotes<

It doesn't quite work perfectly for me as I have replaced Notepad with Notepad++ in the OS, therefore Notepad++ is opened and I have to close it manually.

If you have a bash shell installed, you should be able to create the desired file using touch.

Best regards and good luck,

Edit: just found this, it is the easiest way I've found.
In the DOS prompt just type

Code: Select all

type nul>"test name for empty file."

Re: Shell menu entry for creating a file without an extension

Posted: 01.03.2021, 18:41
by Forez
Odamn-Ete wrote: 27.02.2021, 11:35 Have you tried the following?

In the DOS Prompt (if you have it enabled) type the following:

Code: Select all

Notepad "Name of file in quotes"
[...]
Works

But to many clicks afterwards


Odamn-Ete wrote: 27.02.2021, 11:35 If you have a bash shell installed, you should be able to create the desired file using touch.
Never heard of this

And given my coding "skills" it would be unwise to indulge myself in it

But than you for the alternative idea


Odamn-Ete wrote: 27.02.2021, 11:35 [...]
the easiest way I've found.
In the DOS prompt just type

Code: Select all

type nul>"test name for empty file."
Works

And it is a minimal / quick sollution

But then again: this would have to result with some sort of input window showing up for the test name for empty file, after being executed from any location

Re: Shell menu entry for creating a file without an extension

Posted: 03.03.2021, 08:52
by Odamn-Ete
Forez wrote: 01.03.2021, 18:41 ...
But then again: this would have to result with some sort of input window showing up for the test name for empty file, after being executed from any location
could you clarify please.

I thought you were looking for a quick way to create empty files, where their file names deliver the necessary info.
By the way, I've used this technic before too, as you say it has advantages.

In that case FC is the GUI as long as the DOS Prompt is enabled in FC.
The DOS Prompt executes in the active pane of FC.

Best regards