Windowsはいつからフォワードスラッシュをパスの区切り文字としてサポートするようになったのか?

Windows Path Separators: The Evolution of Forward Slash

Tags: Windows, path separator, forward slash, backward slash, DOS

Introduction:

Windows has long been known for its use of the backward slash (\) as a path separator. However, it may come as a surprise to many that Windows also supports the use of the forward slash (/) as a path separator. In this blog post, we will explore the history and evolution of the forward slash as a path separator in Windows, from its early days as a GUI on top of DOS to its current implementation in Windows 10.

Historical Context:

Before we delve into the specifics of when Windows started supporting the forward slash as a path separator, it is important to understand the historical context. Windows was originally built as a graphical user interface (GUI) on top of DOS, which was the underlying operating system. DOS supported both the forward slash and the backward slash as path separators since version 2.0.

Early Windows and DOS Integration:

When Windows was first introduced, it relied heavily on DOS for its file system operations. As a result, any DOS function that accepted a path name would also support both the forward slash and the backward slash as path separators. This integration between Windows and DOS ensured that users could seamlessly transition between the two systems without any compatibility issues.

Notepad and Path Separators:

One interesting aspect to note is the behavior of the Notepad application in early versions of Windows. Notepad, like other early Windows applications, would typically only display the file name in its title bar, without the path or drive information. However, when a file was opened using a path specified as a command line argument, the path would still be visible in the title bar. This behavior was consistent regardless of whether the path was specified using forward slashes or backward slashes.

Evolution of Windows APIs:

As Windows evolved, so did its APIs. While the DOS/file system parts of Windows have always supported both path separators, other parts of the operating system may or may not have supported the forward slash. However, starting from Windows 1.0, the Notepad application and its standard file open dialog would accept paths delimited by either the forward slash or the backward slash.

Backward Compatibility:

Windows NT and subsequent versions have maintained support for the forward slash as a path separator for backward compatibility reasons. Internally, these versions of Windows would normalize paths to use the backward slash notation. This ensures that older applications and scripts that may still rely on the forward slash as a path separator continue to function correctly.

Conclusion:

In conclusion, the forward slash has a long history as a path separator in Windows. From its early days as a GUI on top of DOS to its current implementation in Windows 10, Windows has always supported both the forward slash and the backward slash as path separators. While the use of the forward slash may not be as common or widely known, it is a testament to the backward compatibility and flexibility of the Windows operating system.

Sources:

1. MS-DOS Encyclopedia

2. Wikipedia – Backslash

3. OS/2 Museum – Why Does Windows Really Use Backslash as Path Separator?

Disclaimer: The information presented in this blog post is based on research and available sources. Any inaccuracies or discrepancies are unintended and should be brought to the attention of the author for correction.

注意

  • この記事はAI(gpt-3.5-turbo)によって自動生成されたものです。
  • この記事はHackerNewsに掲載された下記の記事を元に作成されています。
    Since when does Windows support forward slash as path separator?
  • 自動生成された記事の内容に問題があると思われる場合にはコメント欄にてご連絡ください。

コメントする