[docs] [issue27045] Forward slashes in Windows paths

Tim Peters report at bugs.python.org
Tue May 17 12:29:18 EDT 2016


Tim Peters added the comment:

All versions of cmd.exe want backslashes in paths for the commands implemented _by_ cmd.exe - those interpret a forward slash as indicating an option.  For example, here on Win10 Pro:

C:\WINDOWS\system32>dir c:\Windows\System32\xwreg.dll
 Volume in drive C is OS
 Volume Serial Number is 5E8B-CFAC

 Directory of c:\Windows\System32

10/30/2015  02:17 AM           120,320 xwreg.dll
               1 File(s)        120,320 bytes
               0 Dir(s)  2,880,244,813,824 bytes free

`dir` is implemented by cmd.exe, so that example doesn't work with forward slashes:

C:\WINDOWS\system32>dir c:/Windows/System32/xwreg.dll
Parameter format not correct - "Windows".

----------
nosy: +tim.peters

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27045>
_______________________________________


More information about the docs mailing list