News for hackers. Stuff that matters.
Re:Why does the New menu even exist for creating new empty f... by _carbyau_ on Tuesday July 20, 2021 @08:43PM (#27901003)
I use the New context menu exclusively to make new txt files. Everything else is open the app first territory.

Explorer is weird in a few ways.

- doesn't show NTFS alternate data streams.

- hides "copy as path" behind a shift-rightClick context menu. This is handy for running scripts, but why the "shift" modifier? Same for "Open commandline/powershell" when right clicking whitespace of directory.

- copy and paste a file listing. IE a simple "dir". Or checksums to verify downloaded files. Nope, that requires 3rd party extensions.

Thankfully newer explorer has much better UX for copying/overwriting/deleting files these days.

Re:Why does the New menu even exist for creating new empty f... by lp0_on_fire on Tuesday July 20, 2021 @10:38PM (#27901761)
>This is handy for running scripts, but why the "shift" modifier? Same for "Open commandline/powershell" when right clicking whitespace of directory.

Not a solution to your particular gripe but you can actually type "powershell" or "cmd" (minus quotes) into the address bar in windows explorer and it will open in that directory.

Re:Why does the New menu even exist for creating new empty f... by cm2187 on Wednesday July 21, 2021 @03:48AM (#27903503)
Yes, and there is a long standing bug. Once you have done that, if you go back to the folder window in explorer, and try to select/copy the folder path, all you will get is the path to cmd.exe instead.
Re:Why does the New menu even exist for creating new empty f... by _carbyau_ on Tuesday July 20, 2021 @10:44PM (#27901796)
Holy crap, you can too. Thanks for the tip!
Re:Why does the New menu even exist for creating new empty f... by _carbyau_ on Wednesday July 21, 2021 @02:06AM (#27902849)
Further clarification: google and 3 seconds of testing advise you can run any executable in your PATH environment variable.

Though there is some other step going on as "powershell" will set the current working dir on startup. Possibly a class entry in registry defining the full command to run.

Re:Why does the New menu even exist for creating new empty f... by RcouF1uZ4gsC on Wednesday July 21, 2021 @12:03AM (#27902200)
Amazing!

I have been using Windows since version 3.1, and still did not know this trick. HN is truly an amazing place!

Re:Why does the New menu even exist for creating new empty f... by fomine3 on Wednesday July 21, 2021 @03:55AM (#27903563)
IIRC this is from Vista
Re:Why does the New menu even exist for creating new empty f... by mmis1000 on Wednesday July 21, 2021 @04:20AM (#27903729)
Also "code.cmd ." if you have vscode installed. The address bar works actually like the "Run" box. Capable for running random commands.
Re:Why does the New menu even exist for creating new empty f... by jabbequbs on Wednesday July 21, 2021 @12:31AM (#27902349)
Another one that I use from the address bar is "subl -n ." to open a temporary Sublime Text project. I imagine you could do something similar with VS Code.
Re:Why does the New menu even exist for creating new empty f... by jackson1442 on Wednesday July 21, 2021 @01:05AM (#27902519)
I use a Mac, but I very frequently use `code .` to open vscode for the current directory.
Re:Why does the New menu even exist for creating new empty f... by mmis1000 on Wednesday July 21, 2021 @04:22AM (#27903746)
That didn't work in windows because it tries to open the unix shell wrapper "code" instead of "code.cmd" for some reason.(Because I have wsl2 installed?) Type "code.cmd ." instead works.
Re:Why does the New menu even exist for creating new empty f... by sundvor on Wednesday July 21, 2021 @08:43AM (#27905494)
Hmmmm, I use WSL2/Ubuntu and I always navigate to my folder in Terminal and type `code .` from there - works perfectly. Really love this integration.
Re:Why does the New menu even exist for creating new empty f... by ToFab123 on Tuesday July 20, 2021 @11:34PM (#27902065)
On win 11 typing cmd open a command prompt. Typing powersshell makes explorer navigate to "documents\powersshell".

Edit: typing powershell.exe does the trick

Re:Why does the New menu even exist for creating new empty f... by drdeca on Wednesday July 21, 2021 @12:10AM (#27902236)
You sure it isn’t just because you wrote powershell as powersshell ? The former worked for me
Re:Why does the New menu even exist for creating new empty f... by ToFab123 on Friday July 23, 2021 @04:07AM (#27928383)
I looked into it and it is because I have a folder in "my documents" that is named "powershell". If I rename that folder typing "powershell" opens a new powershell prompt.
Re:Why does the New menu even exist for creating new empty f... by int_19h on Wednesday July 21, 2021 @03:11AM (#27903245)
Better yet, "pwsh".
Re:Why does the New menu even exist for creating new empty f... by Gibbon1 on Wednesday July 21, 2021 @02:59AM (#27903151)
If you type a url it'll open it in a browser as well.
Re:Why does the New menu even exist for creating new empty f... by amanzi on Tuesday July 20, 2021 @11:11PM (#27901945)
Wow - news to me! thanks.
Re:Why does the New menu even exist for creating new empty f... by ergot_vacation on Tuesday July 20, 2021 @09:07PM (#27901148)
Same here. Exclusively for txt files. Especially useful because sometimes you ONLY need a txt file with a title, no content, to act as a crude bit of meta-data for a folder.

The excuse given in the article however just seems like rewarding bad behavior, and explains at least one reason why the Windows GUI is such a disaster (at this point, it's just years and years of junk accumulation as well, but even in 95 there always seemed to be at least 3 ways of doing the same thing).

Re:Why does the New menu even exist for creating new empty f... by tomc1985 on Tuesday July 20, 2021 @11:18PM (#27901980)
That sort of multipath convenience is a dying art. That there are so many ways to accomplish a task is one of the things I admire most about Windows (and to a lesser extent Linux) GUI design

Modern app design almost always forces you into the developer's wonky custom save feature, if there is even a manual save at all, and with webapps you are forced to use cloud storage (possibly with a rental fee attached) as opposed to files on your local device. It would be really nice is everyone gave me standard open/save dialog boxes with all the OS accoutrements; I can't emphasize enough just how handy it is to be able to copy/paste, or create a new folder, or even manage files/directories or even launch programs from within a standard dialog... all because it is using the same view controls that Explorer uses!

Re:Why does the New menu even exist for creating new empty f... by joshspankit on Wednesday July 21, 2021 @07:07AM (#27904715)
I always respected Windows’ multipath convenience. It felt inclusive in a way that accessibility measures still struggle with.
Re:Why does the New menu even exist for creating new empty f... by MarkLowenstein on Wednesday July 21, 2021 @08:22AM (#27905309)
I'll bet you wish "New Text Document" would be the first choice by now too, using most-recently-used order. Has anyone ever right-clicked and said "Yeah I want to make a new Microsoft Access Database here"?
Re:Why does the New menu even exist for creating new empty f... by BitwiseFool on Wednesday July 21, 2021 @03:43PM (#27911116)
It's too late, my muscle memory is firmly embedded. I still find myself going to where "Add/Remove Programs" in the old control panel but Windows changed it to "Programs and Features" decades ago.
Re:Why does the New menu even exist for creating new empty f... by contextfree on Wednesday July 21, 2021 @01:37AM (#27902693)
Since Windows 8 added the ribbon to Explorer I've always put the copy-as-path button in the quick access toolbar (right click on the button -> Add to Quick Access Toolbar) for simple pervasive one-click access.

Apparently Windows 11's Explorer is ditching the ribbon for a simpler looking toolbar. Most people I've seen who've tried it seem to be responding positively due to the less cluttered appearance, which is understandable, but TBH as someone who actually uses a lot of the Explorer functionality I'm not looking forward to more stuff being buried.

Re:Why does the New menu even exist for creating new empty f... by JoBrad on Tuesday July 20, 2021 @11:33PM (#27902062)
In some contexts pasting a copied file pastes the full path to it. For example, copy a file, then paste into the Open dialogs name input, and you’ll get the full path to the file.
Re:Why does the New menu even exist for creating new empty f... by laurent92 on Wednesday July 21, 2021 @02:28AM (#27902960)
I hate that macOS got rid of the textfield for the path. You can display it only using Ctrl+Shift+G, and it opens a second popup with the single text field, but it is not working together with the UI…
Re:Why does the New menu even exist for creating new empty f... by naikrovek on Tuesday July 20, 2021 @08:52PM (#27901056)
> copy and paste a file listing. IE a simple "dir".

I think you can do "dir | clip" at the command line or in the address bar of an explorer window to get this.

> checksums to verify downloaded files.

there is a PowerShell commandlet that does this out of the box, if I remember correctly.

Re:Why does the New menu even exist for creating new empty f... by accrual on Wednesday July 21, 2021 @12:11AM (#27902241)
Get-FileHash myfile.txt

An optional -Algorithm flag lets you choose between MD5, SHA256, etc. It's nice to have this built-in.

For 3rd party options I really like HashTab [0] which is free for personal use. It places a configurable list of hashes in right-click > Properties, with a bonus of comparing the hashes against one you might already have on your clipboard and giving you a green "OK" if it matches.

[0] http://implbits.com/products/hashtab/

Re:Why does the New menu even exist for creating new empty f... by _carbyau_ on Tuesday July 20, 2021 @09:04PM (#27901130)
The command line is useful.

But in the same way most users are not likely to "touch newfile.txt" the GUI isn't helpful.

Re:Why does the New menu even exist for creating new empty f... by naikrovek on Wednesday July 21, 2021 @09:48AM (#27906203)
yes, I know. I can't fix the Windows GUI, but I can try to offer workarounds. Not everyone knows all of the little things you can do, including myself.
Re:Why does the New menu even exist for creating new empty f... by _carbyau_ on Wednesday July 21, 2021 @01:59AM (#27902811)
Ok, figured out more what you were getting at I think.

As per sibling post to yours you can run executables from your PATH environment variable in the address bar.

So while you can't run "dir" directly you can run CMD and pass it dir | clip, or as I did "powershell -command ls|clip"

Nice one! Thanks for the direction!

Re:Why does the New menu even exist for creating new empty f... by naikrovek on Wednesday July 21, 2021 @09:47AM (#27906193)
I try to help when I can. I can't usually solve the actual problem, but I can come up with a workaround.

and I often mess those up, so I'm glad I helped you, even if it was only a little bit.

Re:Why does the New menu even exist for creating new empty f... by gruez on Tuesday July 20, 2021 @08:57PM (#27901090)
>- doesn't show NTFS alternate data streams.

How would that even work?

Re:Why does the New menu even exist for creating new empty f... by _carbyau_ on Tuesday July 20, 2021 @09:02PM (#27901119)
Even if it were in the properties of a file it'd be something. Or treating the file like it does a compressed directory. Or any indicator at all.
Re:Why does the New menu even exist for creating new empty f... by CRConrad on Tuesday July 27, 2021 @06:37PM (#27978494)
> >- doesn't show NTFS alternate data streams.

> How would that even work?

Throw a new pane into its main content preview frame, tabs on both the new and old, label them "Main stream" and "Alt stream" respectively? Something like that.

Re:Why does the New menu even exist for creating new empty f... by hoseja on Thursday July 22, 2021 @03:12AM (#27916295)
You can get the "dir" in the file properties. A little annoying but it's there.