4 ms·
Many Windows commands use "/" to introduce options (much like most Unix commands use "-"). Since the default command shell doesn't require whitespace after the
by _kst_ 11y ago
Many Windows commands use "/" to introduce options (much like most Unix commands use "-"). Since the default command shell doesn't require whitespace after the command name and permits options to follow other arguments, it would be difficult to use "/" as a directory separator in all cases.
An example from Microsoft's documentation:
dir c:\*.txt /w/o/s/p
- ChrisDutrow 11y agoI'm not sure if this normal or not, but I have a lot of trouble telling the back slash and forward slash apart.
- sixothree 11y agoAkthough this does work dir "c:/*.txt" /w/o/s/p
- epsylon 11y agoNot really a problem since a path never starts with a / in a Windows environment.
- jjnoakes 11y agoIf one used / as a path separator, then yes, a path could indeed start with / and be confused with options.
- JdeBP 11y agoA simpler example is cd\windows I explicitly and deliberately differed from this when I wrote a command interpreter. * http://homepage.ntlworld.com./jonathan.deboynepollard/Softwares/cmd/guide/differences.html http://homepage.ntlworld.com./jonathan.deboynepollard/Softwa...