2

Possible Duplicate:
How would I go about creating a filename with invalid characters such as :?>?

Yes I know it is not allowed, but I want to do it anyways. Any workarounds?

ParoX
  • 179

1 Answers1

4

No you cannot.

This isn't a case of escaping the character to get around a GUI or command line limitation, this is a restriction in the kernel. The colon is used for identifying the file stream you are accessing.

Your options are to strip the colons on the source, or replace them with a unicode character that looks like a colon but isn't.

Paul
  • 60,031
  • 19
  • 150
  • 170
  • Apparently Linux has no trouble saving files with : in the name to an NTFS file system. Not sure if WSL2 has safeties to prevent this, but you can always boot Linux separately (for example from a live USB). However, Windows will not be able to access or even rename such files. – mtraceur Oct 13 '23 at 16:22