http://qs321.pair.com?node_id=11107314


in reply to Why are there no errors when opening a filename that contains colons on Win10

You expect open to identify and reject all invalid names. It is not surprising that it is not always able to do this. A far better approach is to write a function that tests the name against the specification https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions, for windows file names.
Bill