TL;DR: Windows did not explicitly support both, but DOS did since 2.0
The answer is rather a clear "yes but" (*1):
- DOS 2.0 and later supported both ways, thus all DOS functions will work properly either way.
- Newer Windows Versions (NT and later) copied that behaviour
- Windows applications did not always follow and may or may not accept either when parsing for filenames.
The Long Read
Since when does Windows support forward slash as path separator?
This depends quite on the viewpoint taken. After all, early Windows is a GUI on top of DOS, originally using DOS and adding a layer to it, not replacing it. DOS in turn supported both slashes as path separators since 2.0. (*1)
The MS-DOS Encyclopedia notes on page 284 regarding path names:
Names in pathnames passed to Interrupt 21H functions can be separated by either a back slash (\) or a forward slash (/). (The forward slash is the separator character used in path names in UNIX/XENIX systems.) For example, the pathnames C:/MSP/SOURCE/ROSE.PAS
and C:\MSP\SOURCE\ROSE.PAS
are equivalent when passed to an Interrupt 21H function.
Thus all DOS functions that take a path name - and all Windows function that forward a path name to DOS - will support both ways (*2) since Windows 1.0 (*3)
This can easily be tried online using PCjs with a Windows 1.01 image (*4)
(Thanks to DL444 for the idea :))
Opening Notepad with a full filename using forward slashes.
This results in Notepad opening that file and showing the path name in its title bar:
Resulting opened file in Notepad
Except, the title line is a bit strange. Normally Notepad shows, like all early windows applications, only the file name, without path or drive (*5), as seen here when navigating with the open dialog:
Opening the test-file using the open dialog box.
But when using a path a command line argument the drive is gone but the path still visible. Doing the same with forward slashes shows a result like using the opening dialog:
Now with back slashes
Using back slashes gives the same output as using the dialog box:
Now it only shows the file name, no path
Ergo, the (DOS?) file function used work with either slash (*6), but applications like Notepad did not at all care about a forward slash. Despite presumably being written by the very same team that did Windows and for sure according to all guidelines at the time.
Many Years Later (Win10)
Using Win 10 CMD to start Notepad using forward slashes works better than expected:
Obviously Notepad has learned a bit within the last 38 years :))
Conclusion: It Does, But it's Incoherent.
The DOS/file system parts of Windows always did and still do support both separators, other parts may or may not (*7) - although they did improve over time.
*1 - BTW: The item has already been asked and answered.
*2 - That's why slash is a forbidden character in file name entries - and a known way to obfuscate software.
*3 - Windows 1.0 requires DOS2.0 or later - but then again, there are no path names prior to 2.0, so that's moot anyway :))
*4 - All following screenshots and observations taken with this setup of PCjs, DOS 2.0 and Windows 1.01.
*5 - And all uppercase.
*6 - Starting with 3.0 DOS itself uses an internal function (INT 2Fh function 1204h) to convert slashes. Interestingly using a WCHAR - I would assume to support MBCS.
*7 - Which in turn is not exactly unusual for Windows