Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.comp.os.windows-10 > #186290 > unrolled thread
| Started by | "J. P. Gilliver" <G6JPG@255soft.uk> |
|---|---|
| First post | 2025-07-28 12:39 +0100 |
| Last post | 2025-07-28 17:21 +0200 |
| Articles | 18 on this page of 38 — 9 participants |
Back to article view | Back to alt.comp.os.windows-10
Creating new files of indeterminate sort? "J. P. Gilliver" <G6JPG@255soft.uk> - 2025-07-28 12:39 +0100
Re: Creating new files of indeterminate sort? Paul <nospam@needed.invalid> - 2025-07-28 08:18 -0400
Re: Creating new files of indeterminate sort? "J. P. Gilliver" <G6JPG@255soft.uk> - 2025-07-28 16:46 +0100
Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-28 18:51 +0200
Re: Creating new files of indeterminate sort? "J. P. Gilliver" <G6JPG@255soft.uk> - 2025-07-28 19:10 +0100
Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-28 22:18 +0200
Re: Creating new files of indeterminate sort? "J. P. Gilliver" <G6JPG@255soft.uk> - 2025-07-29 01:37 +0100
Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-29 09:10 +0200
Re: Creating new files of indeterminate sort? "J. P. Gilliver" <G6JPG@255soft.uk> - 2025-07-29 18:46 +0100
Re: Creating new files of indeterminate sort? knuttle <keith_nuttle@yahoo.com> - 2025-07-29 13:58 -0400
Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-29 20:21 +0200
Re: Creating new files of indeterminate sort? knuttle <keith_nuttle@yahoo.com> - 2025-07-29 15:20 -0400
Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-29 21:47 +0200
Re: Creating new files of indeterminate sort? "J. P. Gilliver" <G6JPG@255soft.uk> - 2025-07-29 22:38 +0100
Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-30 08:57 +0200
Re: Creating new files of indeterminate sort? Paul <nospam@needed.invalid> - 2025-07-29 22:02 -0400
Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-30 09:54 +0200
Re: Creating new files of indeterminate sort? Philip Herlihy <nothing@invalid.com> - 2025-07-30 14:24 +0100
Re: Creating new files of indeterminate sort? Paul <nospam@needed.invalid> - 2025-07-30 09:55 -0400
Re: Creating new files of indeterminate sort? knuttle <keith_nuttle@yahoo.com> - 2025-07-30 13:44 -0400
Re: Creating new files of indeterminate sort? Paul <nospam@needed.invalid> - 2025-07-30 23:33 -0400
Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-29 10:03 +0200
Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-29 10:15 +0200
Re: Creating new files of indeterminate sort? "J. P. Gilliver" <G6JPG@255soft.uk> - 2025-07-29 22:51 +0100
Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-30 09:42 +0200
Re: Creating new files of indeterminate sort? Paul <nospam@needed.invalid> - 2025-07-30 10:02 -0400
Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-30 17:04 +0200
Re: Creating new files of indeterminate sort? "J. P. Gilliver" <G6JPG@255soft.uk> - 2025-07-30 21:49 +0100
Re: Creating new files of indeterminate sort? Mark Lloyd <not.email@all.invalid> - 2025-07-30 18:15 +0000
Re: Creating new files of indeterminate sort? Paul <nospam@needed.invalid> - 2025-07-30 23:37 -0400
Re: Creating new files of indeterminate sort? Chris <ithinkiam@gmail.com> - 2025-07-29 06:26 +0000
Re: Creating new files of indeterminate sort? Paul <nospam@needed.invalid> - 2025-07-29 12:06 -0400
Re: Creating new files of indeterminate sort? Philip Herlihy <nothing@invalid.com> - 2025-07-28 13:40 +0100
Re: Creating new files of indeterminate sort? knuttle <keith_nuttle@yahoo.com> - 2025-07-28 12:43 -0400
Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-28 14:49 +0200
Re: Creating new files of indeterminate sort? "Alan K." <alan@invalid.com> - 2025-07-28 08:53 -0400
Re: Creating new files of indeterminate sort? Herbert Kleebauer <klee@unibwm.de> - 2025-07-28 17:01 +0200
Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-28 17:21 +0200
Page 2 of 2 — ← Prev page 1 [2]
| From | Paul <nospam@needed.invalid> |
|---|---|
| Date | 2025-07-30 23:33 -0400 |
| Message-ID | <106eo60$3i64t$1@dont-email.me> |
| In reply to | #186377 |
On Wed, 7/30/2025 1:44 PM, knuttle wrote:
> I could be wrong but as I remember Powershell was just a CMD that
> was giving administrative privileges. In the current Windows 11 they are
> called Terminal and Terminal (admin). both accept the old DOS commands
> just differing in what they can access.
MSDOS - Close to the hardware, Little protection for the hardware,
"original" shell commands. I don't think there is a Ring0 and a Ring3
for this environment. Some of the commands use raw addresses.
(Raw *physical* addresses, not the virtual ones used elsewhere.)
Command Prompt - Relies on a separate OS. Uses NTVDM for runtime.
MSDOS commands are "emulated", rather than being
direct to hardware. You will be frequently told "this
program only works properly in MSDOS", to remind you
that Command Prompt is not DOSBOX. It's a facade.
PowerShell - The same degree of isolation as the Command Prompt, but
with a "new" programming language and schema. It resorts to
gobs or red text on error. If you run an applet and provide too
few operands, Powershell will ask you for values for the missing
ones (annoying!). Command Prompt does not do that. PowerShell
has tab completion like tcsh. Type something in Powershell,
poke the tab key multiple times and see as it offers suggestions.
In Linux or Unix, you might have several shells. We don't insult them by claiming
one is executing exactly the same commands as the others. They're quite different
at the detail level.
/bin/sh Bourne shell https://en.wikipedia.org/wiki/Bourne_shell
/bin/csh C Shell https://en.wikipedia.org/wiki/C_shell
/bin/tcsh C shell with Tab Completion https://en.wikipedia.org/wiki/Tcsh
While the Windows shells can have *some* similarities
dir # cmd.exe
dir # powershell.exe
the support for dir on powershell, is similar to its half assed support for ls.
dir /ah # cmd.exe (works)
dir /ah # powershell.exe (Uh oh, doesn't work, now we are learning something...)
The dir on Powershell, is an instance of "Get-ChildItem" and it does not
accept the same arguments. So rather than being a custom written "dir",
it is an alias of some kind for "Get-ChildItem". This is a compensation for
the muscle-memory of the user community, who would be typing "dir" and
expecting output like they were typing "ls" on some other systems. But it is
not really dir, it's just a tasty label affixed to "a distant approximation"
to the command.
If I type "ls" in Powershell, it works just as well as typing "dir".
it uses the self-same "Get-ChildItem". If you slap too many arguments
after the "ls" letters (which stand for listdir), the command fails
and you get red colored text.
ls # This never worked in cmd.exe so we expect an error. It's like testing water is wet.
ls # Works as well as "dir" does in Powershell. Would not accept -algtR
So like the Bourne shell example, shells evolve, different people take
a shot at writing them. The language may be procedural, but it can
have some differences. The syntax for a for loop could be quite
different. Powershell has "filter behavior" when piping output from
one applet to another applet (a power user feature, converts gobs of text
into specific terse words).
I don't know enough Powershell to fill a thimble :-) But, I use my experience
to note it's an evolution, someone took a stab at designing a language for
it. And they deposited a few "aliases" in it, to fool you into
thinking that was a real "dir" they offered :-) Well, I was fooled too,
until I did this and it failed. This was a little splash of cold water.
dir /ah # Powershell. Oops. No hidden items for you!
dir /? # Help option in Command Prompt
dir -? # May offer help in Powershell (you *really* should try this one, what an eyeful!)
# I only learned this a few days ago, and me typing it out helps reinforce it :-)
They've made other kinds of "fool you" stuff. Like maybe "wget" is
an alias for some network thing they wrote.
*******
One of the better teaching aids, is when someone makes a "programming card"
with columns for each shell, and what command would be required as an
equivalent for each shell. For Unix, our programming card had five shells
on it, so there were five columns with the commands, and some points in
the table were "missing", when one of the shells had no command to do
a certain thing. For the most part, this wasn't really necessary
for Windows, but maybe a programmer card eventually would be a good idea.
Paul
[toc] | [prev] | [next] | [standalone]
| From | "R.Wieser" <address@is.invalid> |
|---|---|
| Date | 2025-07-29 10:03 +0200 |
| Message-ID | <1069v99$2hejd$1@dont-email.me> |
| In reply to | #186326 |
J.P. , >>>> I wasn't trying to add a _specific_ new type (such as .css); I was >>>> wondering if there was any way to add a _generic_ "new file" to >>>> the list (of things it can create). I could not drop the issue, and googled for how it could/would work on XP. The first result was this one : https://superuser.com/questions/1632295/creating-a-file-with-no-extension-with-right-click-on-windows-10 :-) The whole "trick" seems to be to press ctrl-A to select the whole filename. Regards, Rudy Wieser
[toc] | [prev] | [next] | [standalone]
| From | "R.Wieser" <address@is.invalid> |
|---|---|
| Date | 2025-07-29 10:15 +0200 |
| Message-ID | <1069vve$2hj4c$1@dont-email.me> |
| In reply to | #186330 |
J.P. , Another possibility (likely doesn't pop up the "changing extension" confirmation dialog) : https://stackoverflow.com/questions/77233980/how-to-creating-a-new-file-context-menu-for-blank-no-extension-file-or-your-ow Notice the "NoExtension" entry. Regards, Rudy Wieser
[toc] | [prev] | [next] | [standalone]
| From | "J. P. Gilliver" <G6JPG@255soft.uk> |
|---|---|
| Date | 2025-07-29 22:51 +0100 |
| Message-ID | <106bfpq$2o3h5$3@dont-email.me> |
| In reply to | #186330 |
On 2025/7/29 9:3:25, R.Wieser wrote: > J.P. , > >>>>> I wasn't trying to add a _specific_ new type (such as .css); I was >>>>> wondering if there was any way to add a _generic_ "new file" to >>>>> the list (of things it can create). > > I could not drop the issue, and googled for how it could/would work on XP. > The first result was this one : > > https://superuser.com/questions/1632295/creating-a-file-with-no-extension-with-right-click-on-windows-10 > > :-) > > The whole "trick" seems to be to press ctrl-A to select the whole filename. > > Regards, > Rudy Wieser > > That method - running the file through a text editor so you can use quote marks when saving - could corrupt some non-text files. The better method is to ensure "show extensions [even] for known filetypes" is selected, then you can edit including the extensions without running the files through anything. That should have been the default for that option for decades, ever since black hats started to use double extensions to hide malware. -- J. P. Gilliver. UMRA: 1960/<1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf Of course some of it [television] is bad. But some of everything is bad - books, music, family ... - Melvyn Bragg, RT 2017/7/1-7
[toc] | [prev] | [next] | [standalone]
| From | "R.Wieser" <address@is.invalid> |
|---|---|
| Date | 2025-07-30 09:42 +0200 |
| Message-ID | <106cj48$33k2s$2@dont-email.me> |
| In reply to | #186351 |
J.P. , >> https://superuser.com/questions/1632295/creating-a-file-with-no-extension-with-right-click-on-windows-10 >> >> The whole "trick" seems to be to press ctrl-A to select the whole >> filename. > > That method - running the file through a text editor so you can use > quote marks when saving Thats not what I tried to suggest. You mentioned that, when creating a new document, you could edits the filename itself, but not the extension. At that moment try pressing ctrl-A and see if that results in the extension also getting selected for editing. ... but reading on I think I made an assumption which has made a fool outof me : > The better method is to ensure "show extensions [even] for known > filetypes" > is selected, then you can edit including the extensions without running > the > files through anything. I /assumed/ that you saw, after creating a new document, something like "[filename].ext", with only the part beween the "[" and "]" being editable. Which, from my POV, didn't seem too strange, as most people will want to keep the extension when changing the filename. The ctrl-a "trick" was, I assumed, to change the above into "[filename.ext]" (making the full filename editable). But yes, its quite possible that me having changed the OS configuration when I installed it to always show extensions just /might/ have something to do with me always seeing and being able to edit the full filename. <whistle> > That should have been the default for that option for decades, ever > since black hats started to use double extensions to hide malware. I do not agree with you there. Most users are just that, *users*. They know which icon they need to click on their desktop, but often no more than that. They really need to be protected against their own absense of knowledge (the same reason for why certain OS related files are hidden). Making sure that they can change a filename but not inadvertedly throw the extension away (after which the icon changes and they cannot find the file back and/or double-click it to open it) is one of those protections. Remember all those stories about users which tried to "clean up" their 'puters by throwing all files away they did not recognise - and than complained that their 'puter would not start anymore ? Yeah that happens when you "clean up" the OS folder that way. :-) But for "power"-users ? Certainly. But they are knowledgable enough to disable such hand-holding protections in the configuration just after having installed the OS. As yours truly has done, and absolutily forgotten about. :-| As for the "black hat" example you've given ? AFAIK the OS tries to warn you with a popup when you try to start downloaded executables. What does the run-of-the-mill user ? Figure out which choice makes the popup go away and than blindly apply it, without even reading what it tries to tell them (yeah, I have been shoulder-surfing a number of such users, just to figure out what went "wrong" on their machine - a popup comes up and within half a second its been clicked away). :-\ As such I expect one of the future Windows versions to have a default configuration that prohibits the user from running any executable (of any kind) that has somehow been copied into it (downloaded, thumbdrive, etc). Regards, Rudy Wieser
[toc] | [prev] | [next] | [standalone]
| From | Paul <nospam@needed.invalid> |
|---|---|
| Date | 2025-07-30 10:02 -0400 |
| Message-ID | <106d8m4$388nd$1@dont-email.me> |
| In reply to | #186368 |
On Wed, 7/30/2025 3:42 AM, R.Wieser wrote:
> But yes, its quite possible that me having changed the OS configuration when
> I installed it to always show extensions just /might/ have something to do
> with me always seeing and being able to edit the full filename. <whistle>
Maybe we should take a poll and see how many people leave that
blasted "hide the extension" setting, when installing Windows.
That's one of the first things you "fix" after installation.
You cannot safely or efficiently run with the default setting.
The first example, is what you find with the Hide The Extension in File Explorer Options.
jugofwine (some little icon you can't make out)
jugofwine (some little icon which is not the same as the other one)
versus after the user corrects that setting
jugofwine.txt
jugofwine.jpg
When you can't make out the icon, the extension adds the distinction required.
Paul
[toc] | [prev] | [next] | [standalone]
| From | "R.Wieser" <address@is.invalid> |
|---|---|
| Date | 2025-07-30 17:04 +0200 |
| Message-ID | <106dcbb$39976$1@dont-email.me> |
| In reply to | #186373 |
Paul, > You cannot safely or efficiently run with the default setting. I agree with the first, and it depends to the second. > jugofwine (some little icon you can't make out) ... > jugofwine.txt > jugofwine (some little icon which is not the same as the other one) ... > jugofwine.jpg On my XP machine both show quite recognisable icons in most views. Enough of a distinction not to mix them up. But you are ofcourse aware that its /the users fault/ for having given them both the same names. They should have been wiser than that (yes, the same user who dismisses warnings without reading them) :-p > When you can't make out the icon, the extension adds the distinction > required. True. Or just do what the comon user does : double-click it and see what happens. If what happens is not what is needed just close ... the whatever and double-click the other one. :-) Though one rather nasty drawback of not displaying the extension is that an executable can be given any icon a malware writer desires. Including the one indicating a picture. Double-click that "picture" and you're f*cked. :-( Regards, Rudy Wieser
[toc] | [prev] | [next] | [standalone]
| From | "J. P. Gilliver" <G6JPG@255soft.uk> |
|---|---|
| Date | 2025-07-30 21:49 +0100 |
| Message-ID | <106e0gr$2o3h6$10@dont-email.me> |
| In reply to | #186368 |
On 2025/7/30 8:42:3, R.Wieser wrote: > J.P. , > >>> https://superuser.com/questions/1632295/creating-a-file-with-no-extension-with-right-click-on-windows-10 >>> >>> The whole "trick" seems to be to press ctrl-A to select the whole >>> filename. >> >> That method - running the file through a text editor so you can use >> quote marks when saving > > Thats not what I tried to suggest. No, not you, but one of the people in the discussion someone posted a link to suggested that method. > > You mentioned that, when creating a new document, you could edits the > filename itself, but not the extension. At that moment try pressing ctrl-A > and see if that results in the extension also getting selected for editing. If I did say that, it's not what I _meant_ to say. What I _meant_ to say is that, by default or after you've added a few bits of software, the "New" option in File Manager still only offer a list of predefined filetypes, all of which of course come with their own extension; I was wondering if there was any way to add to that list the option to add a new filetype with an arbitrary (or no) extension. Given that you _can_ only create files from the predefined list of types, I _can_ relatively easily edit the extension: the new filename appears with the before-the-dot part _highlighted_, since in most case people _don't_ want to change the extension, but it's easy to move the cursor (or whatever) to edit the extension if you want to. (At least it is with "hide extensions" turned off; I usually turn that off so soon after starting using a system that I don't know if you can edit extensions when hidden.) > > ... but reading on I think I made an assumption which has made a fool outof > me : > >> The better method is to ensure "show extensions [even] for known >> filetypes" >> is selected, then you can edit including the extensions without running >> the >> files through anything. > > I /assumed/ that you saw, after creating a new document, something like > "[filename].ext", with only the part beween the "[" and "]" being editable. Well, only that part is _highlighted_, but you can move onto the extension easily enough. > Which, from my POV, didn't seem too strange, as most people will want to > keep the extension when changing the filename. > > The ctrl-a "trick" was, I assumed, to change the above into "[filename.ext]" > (making the full filename editable). > > But yes, its quite possible that me having changed the OS configuration when > I installed it to always show extensions just /might/ have something to do > with me always seeing and being able to edit the full filename. <whistle> > >> That should have been the default for that option for decades, ever >> since black hats started to use double extensions to hide malware. > > I do not agree with you there. > > Most users are just that, *users*. They know which icon they need to click > on their desktop, but often no more than that. They really need to be > protected against their own absense of knowledge (the same reason for why > certain OS related files are hidden). Making sure that they can change a > filename but not inadvertedly throw the extension away (after which the icon > changes and they cannot find the file back and/or double-click it to open > it) is one of those protections. They need to be protected against inadvertently changing extensions, granted. That's why, if you have hiding turned off (i. e. extensions visible) and you select rename (e. f. with F2), only the name part is _highlighted_. But they also need protecting against malware with "double extensions", such as .doc.exe (or perhaps .txt.com more likely when this practice started). Such malware would, if extensions are hidden, just appear as .doc or .txt files; sure, the user will have a moment of puzzlement at seeing those extensions when s/he thought they'd turned them off, but might well still double-click them. I think actually running malware is more dangerous than just changing an extension - the latter can usually be fixed by asking someone more experienced if they can't find the file, but the former might do goodness knows what, certainly nothing benign or its writer wouldn't have done it.> > Remember all those stories about users which tried to "clean up" their > 'puters by throwing all files away they did not recognise - and than > complained that their 'puter would not start anymore ? Yeah > that happens when you "clean up" the OS folder that way. :-) Yes. And those stories of all those users who clicked on (say) sharapova.jpg (I think that was the name) thinking they'd see a picture of a tennis player.> > But for "power"-users ? Certainly. But they are knowledgable enough to > disable such hand-holding protections in the configuration just after having > installed the OS. As yours truly has done, and absolutily forgotten about. > :-| > > As for the "black hat" example you've given ? AFAIK the OS tries to warn > you with a popup when you try to start downloaded executables. What does Yes, it does these days. (Though trivial to bypass by moving the executables from somewhere other than the internet. But probably saves _some_ malware from being run, if it wasn't for ...) > the run-of-the-mill user ? Figure out which choice makes the popup go away > and than blindly apply it, without even reading what it tries to tell them ... that.) I used to have a quote something like "The difficulty in making things idiot-proof, is that idiots can be so damn ingenious." > (yeah, I have been shoulder-surfing a number of such users, just to figure > out what went "wrong" on their machine - a popup comes up and within half a > second its been clicked away). :-\ Very true. And not just they, but we do it too - the "ohnosecond" between dismissing and thinking "_what_ did that say?". > > As such I expect one of the future Windows versions to have a default > configuration that prohibits the user from running any executable (of any > kind) that has somehow been copied into it (downloaded, thumbdrive, etc). We sure seem to be going that way. The eternal nannying increase is one of the main reasons I hate "up"grading!> > Regards, > Rudy Wieser > > John -- J. P. Gilliver. UMRA: 1960/<1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf Heaven forbid today's audience should feel bombarded with information or worse, lectured. Dont'scare the horses by waving facts around. - David Butcher, RT 2014/11/29-12/5
[toc] | [prev] | [next] | [standalone]
| From | Mark Lloyd <not.email@all.invalid> |
|---|---|
| Date | 2025-07-30 18:15 +0000 |
| Message-ID | <688a6153$0$14$882e4bbb@reader.netnews.com> |
| In reply to | #186351 |
On Tue, 29 Jul 2025 22:51:54 +0100, J. P. Gilliver wrote: > On 2025/7/29 9:3:25, R.Wieser wrote: [snip] > That should have been the default for that option for decades, ever > since black hats started to use double extensions to hide malware. Do you mean something like this? info.txt.exe That's not really "double extension". The extension is .exe, but Windows (by default) makes it look like .txt but that is not an extension (which explains why its not hidden too). Click on the file and Windows knows the extension is .exe. BTW, I always turn that lying option off. -- Mark Lloyd http://notstupid.us/ "To me, faith is not better because it is atheistic rather than theistic. I am an atheist because of a *lack* of faith, *not* because of a different faith." [Russell Turpin on alt.atheism]
[toc] | [prev] | [next] | [standalone]
| From | Paul <nospam@needed.invalid> |
|---|---|
| Date | 2025-07-30 23:37 -0400 |
| Message-ID | <106eode$3i74l$1@dont-email.me> |
| In reply to | #186379 |
On Wed, 7/30/2025 2:15 PM, Mark Lloyd wrote: > On Tue, 29 Jul 2025 22:51:54 +0100, J. P. Gilliver wrote: > >> On 2025/7/29 9:3:25, R.Wieser wrote: > > > [snip] > >> That should have been the default for that option for decades, ever >> since black hats started to use double extensions to hide malware. > > Do you mean something like this? > > info.txt.exe > > That's not really "double extension". The extension is .exe, but Windows > (by default) makes it look like .txt but that is not an extension (which > explains why its not hidden too). Click on the file and Windows knows the > extension is .exe. > > BTW, I always turn that lying option off. > That's your OPSEC showing. You want to see the full name, extensions and all, so you don't get phished. This is why we turn on the extensions -- "full disclosure". There are still tricks you can do with exotic character sets, so really this only alerts you to the "easy phishing". There are also character sequences that can be used, where only a person with good eyesight will detect something is wrong with the file. Paul
[toc] | [prev] | [next] | [standalone]
| From | Chris <ithinkiam@gmail.com> |
|---|---|
| Date | 2025-07-29 06:26 +0000 |
| Message-ID | <1069pjh$2gaer$1@dont-email.me> |
| In reply to | #186292 |
Paul <nospam@needed.invalid> wrote: > On Mon, 7/28/2025 7:39 AM, J. P. Gilliver wrote: >> Is there any way to add something of the sort to the "New ..." menu in >> File Manager? >> >> I recently wanted to create a .css file, for example. The only way I >> know is to create a new text file (that's the only option that makes a >> file of zero size), then rename it, accepting the warning about changing >> the extension. (Or create and edit it as a text file, then have to >> fiddle with the name in the save function in Notepad or whatever editor.) >> > > There probably is a way to make a .css file from a menu. > > In Notepad, setting the filetype to "All Files" and saving as "some.css" > seems to give a CSS file without a .txt glued to the end. It does not > look like the operation is that much of a trauma, to be done manually :-) > > On the Macintosh, there was a utility called "FileTyper" which everyone > used, and that is the rough equivalent of changing the extension from > .txt to .css . It's a popular topic, this object oriented override wish > we have. On their utility, it still takes typing, to make the change. > Just in case you were thinking the utility was a mind reader and did > the right thing without asking. > > But making a menu with the creation capability for 200 item types, > does that make sense ? That's what we have to ask. On Linux, there > is one wildcard file type and it is a "New.txt" kind of thing (users > edit the details), there is a folder creation item and so on. They > don't have 200 file types in their menu, and they also don't even > rely on the extension for identifying files. A CSS would be detected > by having "CSS constructs" or a "CSS magic number" near the top of the file. > > On Linux, there are at least 100 different text file types which the > "file" utility recognizes. Including text file types I would claim > to you are "damaged goods", Linux identifies them as if they > exist intentionally. Like a text file, where the line termination > style changes... half way through the document. Linux has a detection > for that. "file" uses the magic number to identify the file type. It doesn't care what the extension is. Linux overall also doesn't generally care either. On linux I would use the 'touch' command to create whatever empty new file I wanted. No need for a gui or mouse clicks.
[toc] | [prev] | [next] | [standalone]
| From | Paul <nospam@needed.invalid> |
|---|---|
| Date | 2025-07-29 12:06 -0400 |
| Message-ID | <106arhh$2o04p$1@dont-email.me> |
| In reply to | #186328 |
On Tue, 7/29/2025 2:26 AM, Chris wrote: > > "file" uses the magic number to identify the file type. It doesn't care > what the extension is. Linux overall also doesn't generally care either. > > On linux I would use the 'touch' command to create whatever empty new file > I wanted. No need for a gui or mouse clicks. This is a wish to fit the activity into a shellex menu. There are some people here, with quite elaborate customization. Their screen looks like the panel from the 747. Paul
[toc] | [prev] | [next] | [standalone]
| From | Philip Herlihy <nothing@invalid.com> |
|---|---|
| Date | 2025-07-28 13:40 +0100 |
| Message-ID | <MPG.42f180124197c1fd9896b3@news.eternal-september.org> |
| In reply to | #186290 |
In article <1067nhn$21tqk$2@dont-email.me>, G6JPG@255soft.uk says... > >Is there any way to add something of the sort to the "New ..." menu in >File Manager? > >I recently wanted to create a .css file, for example. The only way I >know is to create a new text file (that's the only option that makes a >file of zero size), then rename it, accepting the warning about changing >the extension. (Or create and edit it as a text file, then have to >fiddle with the name in the save function in Notepad or whatever editor.) I asked Perplexity.ai: "In Windows, when you right click within a folder or on the desktop, the context menu offers options to create New files of various types. How can I add to that list, so that I could create, for example, a new file of type .css?" Here's what it came back with: To add a file type like .css to the Windows context menu's "New" submenu (shown when you right click in a folder or on the desktop), you need to edit the Windows Registry. Here?s a step-by-step guide for adding a new .css file option: Steps to Add a .css File Option Open the Registry Editor Press Windows + R, type regedit, and hit Enter. Navigate to the Right Location Go to: HKEY_CLASSES_ROOT Scroll down to find the extension you want. If .css is not present, create it: Right-click on HKEY_CLASSES_ROOT Select New > Key Name the key: .css Create the ShellNew Key Right-click on the .css key you just created Select New > Key Name this new key: ShellNew Add the NullFile Value (for a blank .css file) With ShellNew selected, right-click in the right pane Select New > String Value Name it: NullFile Leave its value empty This will create a new blank .css file when you choose "New > Cascading Style Sheet Document" from the context menu. Optional step: If you want new .css files to contain template content, instead of NullFile, use a string value named FileName and set it to point to a template file (such as css.css in C:\Windows\ShellNew\): text "FileName"="css.css" Applying Changes Restart File Explorer (or reboot) for the new menu item to appear. Sample Registry Entry If you prefer, you can create a .reg file with the following contents, then run it: Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\.css] @="cssfile" [HKEY_CLASSES_ROOT\.css\ShellNew] "NullFile"="" Save this into a file like add-css-to-context-menu.reg and double-click it to add the entry. After completing these steps, you will see "Cascading Style Sheet Document" (.css) as an option in your right-click "New" menu, letting you quickly create new .css files wherever you need them. -- Phil, London
[toc] | [prev] | [next] | [standalone]
| From | knuttle <keith_nuttle@yahoo.com> |
|---|---|
| Date | 2025-07-28 12:43 -0400 |
| Message-ID | <10689b1$27iih$1@dont-email.me> |
| In reply to | #186297 |
On 07/28/2025 8:40 AM, Philip Herlihy wrote: > In article <1067nhn$21tqk$2@dont-email.me>, G6JPG@255soft.uk says... >> >> Is there any way to add something of the sort to the "New ..." menu in >> File Manager? >> >> I recently wanted to create a .css file, for example. The only way I >> know is to create a new text file (that's the only option that makes a >> file of zero size), then rename it, accepting the warning about changing >> the extension. (Or create and edit it as a text file, then have to >> fiddle with the name in the save function in Notepad or whatever editor.) > > > I asked Perplexity.ai: "In Windows, when you right click within a > folder or on the desktop, the context menu offers options to create New > files of various types. How can I add to that list, so that I could > create, for example, a new file of type .css?" > > Here's what it came back with: > > To add a file type like .css to the Windows context menu's "New" submenu > (shown when you right click in a folder or on the desktop), you need to > edit the Windows Registry. Here?s a step-by-step guide for adding a new > .css file option: > > Steps to Add a .css File Option > Open the Registry Editor > > Press Windows + R, type regedit, and hit Enter. > > Navigate to the Right Location > > Go to: HKEY_CLASSES_ROOT > > Scroll down to find the extension you want. If .css is not present, > create it: > > Right-click on HKEY_CLASSES_ROOT > > Select New > Key > > Name the key: .css > > Create the ShellNew Key > > Right-click on the .css key you just created > > Select New > Key > > Name this new key: ShellNew > > Add the NullFile Value (for a blank .css file) > > With ShellNew selected, right-click in the right pane > > Select New > String Value > > Name it: NullFile > > Leave its value empty > > This will create a new blank .css file when you choose "New > Cascading > Style Sheet Document" from the context menu. > > Optional step: If you want new .css files to contain template content, > instead of NullFile, use a string value named FileName and set it to > point to a template file (such as css.css in C:\Windows\ShellNew\): > > text > "FileName"="css.css" > Applying Changes > Restart File Explorer (or reboot) for the new menu item to appear. > > Sample Registry Entry > If you prefer, you can create a .reg file with the following contents, > then run it: > > > Windows Registry Editor Version 5.00 > > [HKEY_CLASSES_ROOT\.css] > @="cssfile" > > [HKEY_CLASSES_ROOT\.css\ShellNew] > "NullFile"="" > Save this into a file like add-css-to-context-menu.reg and double-click > it to add the entry. > > After completing these steps, you will see "Cascading Style Sheet > Document" (.css) as an option in your right-click "New" menu, letting > you quickly create new .css files wherever you need them. > It is easier to open the Notepad form the Start, type the instruction you what in the new CSS file, and save with as "YOURFILENAME.css" in the appropriate directory. I do it all of the time writing BAT files. I open the Notepad and write the instruction I want. Leaving Notepad open, I save the BAT file in the directory where it is to be used. If it does not work I go back to Notepad, make the correction and save the correction to revise my BAT file.
[toc] | [prev] | [next] | [standalone]
| From | "R.Wieser" <address@is.invalid> |
|---|---|
| Date | 2025-07-28 14:49 +0200 |
| Message-ID | <1067rle$3gkm1$1@dont-email.me> |
| In reply to | #186290 |
J.P. , > Is there any way to add something of the sort to the "New ..." menu in > File Manager? If you have no problem with manually editing the registry, there sure is in my ancient OS (XPsp3) - meaning I'm not at all sure if it still works/works the same under W10, but give it a go. Personally I've added an entry for a new .HTM file, and I expect it to work the same for any other filetype. Its done like this : Open the registry and add the following : - - - - - - - - - - - [HKEY_CLASSES_ROOT\.css\ShellNew] "FileName"="Template.css" - - - - - - - - - - - (the "HKEY_CLASSES_ROOT\.css" folder should already exist.) After that navigate to the "%USERPROFILE%\Templates" folder, and create a new "Template.css" file. Put whatever you want as the default in it (like "<style>" at the top, some blank lines and "</style>" at the bottom). Thats all it should need. Hope it helps. Regards, Rudy Wieser
[toc] | [prev] | [next] | [standalone]
| From | "Alan K." <alan@invalid.com> |
|---|---|
| Date | 2025-07-28 08:53 -0400 |
| Message-ID | <1067rrj$257jq$1@dont-email.me> |
| In reply to | #186290 |
On 7/28/25 7:39 AM, J. P. Gilliver wrote:
> Is there any way to add something of the sort to the "New ..." menu in
> File Manager?
>
> I recently wanted to create a .css file, for example. The only way I
> know is to create a new text file (that's the only option that makes a
> file of zero size), then rename it, accepting the warning about changing
> the extension. (Or create and edit it as a text file, then have to
> fiddle with the name in the save function in Notepad or whatever editor.)
There seems to be. I'm not able to get to my Windows machine to verify this but I've
added one or two to my system. Also removed a few.
https://www.nirsoft.net/utils/shell_menu_new.html
This is a nice utility to edit/remove items from the right click 'new' menu.
Not sure it allows adding though.
Copilot seems to think this is a valid way to manually add an item.
---------------
🛠️ Steps to Add a New File Type to 'New' Menu:
Open Registry Editor:
Press Win + R, type regedit, and hit Enter.
Navigate to File Extension Key:
Go to HKEY_CLASSES_ROOT\.sh (for Bash scripts, for example).
If the key doesn’t exist, create it.
Create or Open the ShellNew Key:
Right-click on .sh, choose New > Key, name it ShellNew.
Add a String or DWORD Value: You have options here:
Add a NullFile entry (no value): creates a blank file when used.
Or add a FileName string value pointing to a template (e.g., "FileName"="template.sh").
Place the template in C:\Windows\ShellNew\.
Confirm It Works:
Right-click on the desktop or in a folder, open the “New” submenu, and your new file type
should appear.
----------------------------------------------
Also it gives this registry key and says the key governs file type handlers.
HKEY_CLASSES_ROOT\.extension\ShellNew
Maybe this gets you started. Bottom line is, yes, it can be done.
--
Linux Mint 22.1, Thunderbird 128.13.0esr, Mozilla Firefox 141.0
Alan K.
[toc] | [prev] | [next] | [standalone]
| From | Herbert Kleebauer <klee@unibwm.de> |
|---|---|
| Date | 2025-07-28 17:01 +0200 |
| Message-ID | <10683d3$26heh$1@dont-email.me> |
| In reply to | #186290 |
On 7/28/2025 1:39 PM, J. P. Gilliver wrote: > Is there any way to add something of the sort to the "New ..." menu in > File Manager? > > I recently wanted to create a .css file, for example. And there maybe are other like .doc .bat .cmd .log .exe and so on. If you create an entry in the right-click menu for any of this file types, it becomes very confusing. > The only way I > know is to create a new text file (that's the only option that makes a > file of zero size), then rename it, Whats wrong with just one entry for the most used type .txt? If you create it, the default file name is already highlighted so all you have to is to press <CTRL>-A and the new name including the .css. That are just 5 keystrokes more (<CTRL>-A .css) than you would have to enter for a separate entry for .css . > accepting the warning about changing the extension. You are right, that requires an extra <RETURN>, so in total it makes 6 additional keystrokes, but as a reward you get a clean right-click menu.
[toc] | [prev] | [next] | [standalone]
| From | "R.Wieser" <address@is.invalid> |
|---|---|
| Date | 2025-07-28 17:21 +0200 |
| Message-ID | <10684hj$26vit$1@dont-email.me> |
| In reply to | #186303 |
Herbert, > You are right, that requires an extra <RETURN>, so in total it > makes 6 additional keystrokes, but as a reward you get a clean > right-click menu. My right-click menu is quote clean, as all it contains a "new" submenu (holding all the choices). Also, creating a new document using the right-click -> "new" menu allows you to load a template (a file containing the basic setup for the extension). iow, even for a .css file it saves you quite a bit more than 6 keystrokes. And quite a bit more for a basic .htm file. Regards, Rudy Wieser
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | alt.comp.os.windows-10
csiph-web