When did Windows start accepting forward slash as a path separator?

Duncan Booth duncan at NOSPAMrcp.co.uk
Fri Sep 26 05:13:25 EDT 2003


Grant Edwards <grante at visi.com> wrote in 
news:slrnap5gfa.aol.grante at localhost.localdomain:

>> I _think_ (can't be sure...) that at a C-libraries level the switch
>> occurred either between DOS 1.0 and 1.1, or at the time of release of
>> 2.0.
> 
> I don't think 1.0 had a hierarchical filesystem at all did it?  

That is correct, originally DOS like CP/M didn't have a concept of 
directories, all file access used file control blocks. When they added 
directories in Dos 2.0 they added new int21 calls which supported the 
directory paths and these have always accepted either forward or reversed 
slashes as path separators interchangeably.

Dos 3.0 added an int21 call to canonicalize pathnames which included 
converting all forward slashes to backslashes.

-- 
Duncan Booth                                             duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?




More information about the Python-list mailing list