3 ms·
The DOS command line uses '/' to deliniate arguments. So I've just realised that that would have to change, a more serious problem.
by pjc50 11y ago
The DOS command line uses '/' to deliniate arguments. So I've just realised that that would have to change, a more serious problem.
- stephengillie 11y agoI vaguely remember something about MS coders already using / to delineate arguments and \ for file paths; when they realized UNIX used \ for that function and they'd have to interoperate over a network, it was already too late.
- WalterGR 11y agoI don't think it was about networking, necessarily. Here are a couple references: http://superuser.com/questions/176388/why-does-windows-use-backslashes-for-paths-and-unix-forward-slashes http://superuser.com/questions/176388/why-does-windows-use-b... MS-DOS 1.0 (which did not support directories at all) was already using / to introduce command-line options. It took this usage of / from CP/M, which took it from VMS. http://blogs.msdn.com/b/larryosterman/archive/2005/06/24/432386.aspx http://blogs.msdn.com/b/larryosterman/archive/2005/06/24/432... goes into more detail.
- WalterGR 11y agoSupport for / as a path separator exists for some built-in commands, but it's very spotty. For example: E:>cd ./work/depot/code E:\Work\depot\code>cd / The syntax of the command is incorrect. E:\Work\depot\code>cd e:/ E:>dir / Invalid switch - "". E:>dir ./ Invalid switch - "". E:>dir e:/ Invalid switch - "".
- ynik 11y agoMost built-in commands will accept / if you put the path in quotes: c:\>dir "d:/" Volume in drive D is HDD ... This is quite useful when writing cross-platform makefiles :)
- WalterGR 11y agoI can't believe I didn't know that. Thanks. Real bummer that you have to specify the drive letter. (At least on Win7, where I just tried it.) The behavior is kind of interesting for 'dir' at least: E:>dir "/" Directory of \\ File Not Found E:>dir \\ The filename, directory name, or volume label syntax is incorrect. Same result for «dir "//"». (For those not experienced with the Windows command prompt, seeing "Directory of \\" is unexpected, and seeing it means that something interesting must be going on.)