4 ms·
Every Windows shell (CMD.EXE and PowerShell and even File Explorer) has always accepted / paths. \ paths will never go away due to backwards compatibility. Most
by WorldMaker 6y ago
Every Windows shell (CMD.EXE and PowerShell and even File Explorer) has always accepted / paths. \ paths will never go away due to backwards compatibility. Most Windows apps happily work with documents that are CR only, including Notepad since Windows 7 IIRC. CRLF will likely stay the default for backward compatibility reasons, too. You can blame IBM for both of those things as IBM mainframes were CRLF and IBM thought / a better option prefix key than a path separator.
- ygra 6y agoNote that paths with / won't always work in cmd when using built-in commands. For executables and their command lines, sure, but for at least some built-in commands you must use \ for path arguments because the parser otherwise parses an option. Not sure about CR-only, but Notepad only recently-ish (a year ago, perhaps) gained the ability to work with LF-only text files. Mind you, that's probably not a fix in Notepad, but really in the decades-old Win32 edit control ... (which might give a hint as to why this was neither much of a priority, nor probably an easy fix while not breaking anything else).
- WorldMaker 6y agoRight, I meant LF-only, that was a brain fart. It is recent to Notepad, but I don't it is that recent. But yes, also Notepad for a long time was the simplest wrapper around the Win32 edit control possible, and likely rarely a priority. (Similar too how long WordPad was merely the simplest wrapper around the RTF control.)