且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在Windows中使用冒号(“:")来创建文件名

更新时间:2022-05-10 08:15:31

在Windows中,冒号不是文件名中允许的字符.或者,更准确地说,它用于寻址文件的备用数据流.因此,asdf:qwer寻址名为asdf的文件的名为qwer的流.

Colon is not an allowed character in a filename in Windows. Or, more precisely, it is used to address an Alternate Data Stream of a file. So, asdf:qwer addresses the stream named qwer of the file named asdf.

这与反斜杠非常相似. asdf\qwer也不是有效的文件名,而是指向文件夹asdf的文件qwer.

This is very similar to the backslash. asdf\qwer is also not a valid filename, instead it addresses the file qwer of the folder asdf.