Page 1 of 1

weird rename bug if filename starts with 'con.'

Posted: 17 May 2026 19:00
by demotix
To reproduce:
1. select a folder
2. right click and "Create text file" to create a file 'con.txt'

Result:
error dialog "Bad Filename" and "This is not a valid filename"

hmm... it seems if a filename begins 'con.' then the error occurs.
==========================================
OS: Windows 11 Pro, 64-bit, Version 25H2, Build 26200.8457 (10.0), AMD64
XYplorer: 28.30.0600 (64-bit) - Standard License Professional
screen scaling 125%

Re: weird rename bug if filename starts with 'con.'

Posted: 17 May 2026 19:05
by highend
That's not a bug in XY, that's what Windows prevents. Try the same in Windows Explorer, same result...

Re: weird rename bug if filename starts with 'con.'

Posted: 17 May 2026 19:16
by demotix
that's the daft bit
i tried in terminal and did 'ls > con.txt' and it created the file no problem, lol

but you're right, it's a feature of DOS

'con' is one of a number of reserved device names - since 1981, i just didn't bump into this for 45 years.

Re: weird rename bug if filename starts with 'con.'

Posted: 17 May 2026 19:43
by demotix
ok, digging deeper.

i can create con.txt in Windows Explorer, and edit the file. ...but then I get downstream weirdness like Terminal autocomplete can't see 'con.txt' - yikes.
And claude.ai reckons your filtering on con.txt is correct, "CON, and CON followed by any extension, is reserved" it claims MS docs say.

yep. ok . Windows is horrible and XY is in the clear.