weird rename bug if filename starts with 'con.'

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
demotix
Posts: 3
Joined: 17 May 2026 18:50

weird rename bug if filename starts with 'con.'

Post 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%

highend
Posts: 14923
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

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

Post by highend »

That's not a bug in XY, that's what Windows prevents. Try the same in Windows Explorer, same result...
One of my scripts helped you out? Please donate via Paypal

demotix
Posts: 3
Joined: 17 May 2026 18:50

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

Post 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.

demotix
Posts: 3
Joined: 17 May 2026 18:50

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

Post 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.

Post Reply