6 ms·
Along the same lines, in the Windows world: The current directory is managed with SetCurrentDirectory/GetCurrentDirectory, however the cmd.exe command-line she
by seligman99 3y ago
Along the same lines, in the Windows world:
The current directory is managed with SetCurrentDirectory/GetCurrentDirectory, however the cmd.exe command-line shell also stores the current directory for each drive in an environment variable like "=C:", and the CRT and shell hides all environment variables that start with a "=".
It gets mightily confused if these two concepts of current directory ever diverge.
- c0pium 3y agoWho is still using cmd.exe? I understand that there are system processes that still need it, but if you see a human using cmd in the year of our lord 2023, that’s a cry for help!
- PhilipRoman 3y agoIt's installed everywhere on any version of windows and works fine for interactive tasks (personally I wouldn't write anything but the simplest scripts for it, anything with for loops is a big no-no)
- vel0city 3y agoPowershell is installed everywhere on any version of Windows that still receives security updates.
- schemescape 3y agoWhat should I be using instead? I don’t mind cmd.exe and it launches instantly (same reason I frequently use notepad.exe for quick edits). That latter quality is very hard to find :) Edit: but if you meant for scripting, yeah, batch files are terrible.
- hiccuphippo 3y agoPersonally I use the bash that comes with git for Windows. I only need to use cmd.exe for creating symlinks since mklink is a built-in.
- switch007 3y agoOn my Windows 10 with no profile it takes 1-2 seconds (Ryzen 3600/M2/32GB RM). Like, what is it doing? I get annoyed if bash on Linux takes like 250ms.
- schemescape 3y agoOpening cmd.exe or PowerShell (or something else)?
- switch007 3y agoPowerShell
- toast0 3y agoI do. I don't like PowerShell (and it took me years to realize it wasn't a diagnostic tool for power management), and I find bash for Windows to be ill fitting. I don't do a lot of stuff in the command line on Windows, so working like it has for decades is a plus.