No. A single dot means the current directory and 2 dots mean the parent directory, just like on *nix
- Use a period as a directory component in a path to represent the current directory, for example ".\temp.txt". For more information, see Paths.
- Use two consecutive periods (..) as a directory component in a path to represent the parent of the current directory, for example "..\temp.txt". For more information, see Paths.
Naming Files, Paths, and Namespaces
In fact a more general rule is that no file can end with a dot in Windows
Do not end a file or directory name with a space or a period. Although the underlying file system may support such names, the Windows shell and user interface does not. However, it is acceptable to specify a period as the first character of a name. For example, ".temp".
See
The reason is because they'll be normalized when passing to Win32 APIs
Some characters will be removed (other than runs of separators and relative segments).
If a segment ends in a single period, that period will be removed. A segment of a single or double period falls under the relative component rule above. A segment of three periods (or more) doesn't hit any of these rules and is actually a valid file/directory name.
If the path doesn't end in a separator, all trailing periods and spaces (charater [sic] code 32 only) will be removed. If the last segment is simply a single or double period it falls under the relative components rule above. This rule leads to the possibly surprising ability to create a directory with a trailing space. You simply need to add a trailing separator to do so.
Path Normalization
That doesn't mean that those files can't be created though, because NTFS namespace is fully POSIX-compatible. You just need to append the \\?\
prefix to disable file name normalization
For file I/O, the "\?" prefix to a path string tells the Windows APIs to disable all string parsing and to send the string that follows it straight to the file system
Naming Files, Paths, and Namespaces
See also
.ssh
,.gnupg
, etc.). I'm not certain on when the functionality was added to File Explorer in Win10, but v1903 does allow this through File Explorer as well. If your question is can a directory simply be named.
, no, as no OS allows this because a single.
is an alias for the current directory, just as..
is an alias for the preceding directory.Windows allows directories to be named with a preceding dot, but only via CLI on many Windows editions
that's incorrect. You can create directories and files with a preceding dot like I commented. The final dot will automatically be removed and you'll get.ssh
,.gnupg
as expected