Posted February 12, 2021
dtgreene: The effect I would expect for "copy con con" is that it would copy keyboard input to the screen (or the DOS terminal).
copy con filename.txt copies keyboard input to the file, but echos it on the screen. copy con con.any would attempt to copy the keyboard input to the keyboard and your keyboard stops working. In DOS you would use ^z for that. (Ctrl-Z)
dtgreene: I remember that cygwin would allow me to create files with those names, and when trying to delete them through WIndows Explorer would give strange error messages that didn't make any sense. (Can WSL create such files?)
Yup, that's exactly what some of those badly coded software do as well. Cygwin should not do that, but it does. Anyway, Win10 supports Linux now so Cygwin is pretty much dead. Does it still even exist? Oh, if you have one of those folders, to remove it open cmd with admin rights and run rd "\\.\c:\foo\bar\con" /S /Q
Note: this command uses /S so you better be sure there's nothing valuable in that folder.
Post edited February 12, 2021 by frogthroat