Cool Discovery using the extension ".chg" on a server
This may interest, like, 4 of you, but I thought it was pretty neat, and I mentioned it on IRC a while ago, but I want to see what you guys think, or if you've heard of this before, because googling turned up nothing.
I discovered this when I needed to download something from my server, but the network the computer I was using was attached to wouldn't allow downloads of certain file extensions. So I connected to my server with UltraVNC, and changed the file's extension from file.mp3 to file.mp3.chg (chg meaning, of course, "Change", as in, "Change this extension back"). But then, when I downloaded the file, it automatically changed from file.mp3.chg to file.mp3.mp3!
I've tried this with numerous extensions, and it seems to work for all that I've encountered. It will not change the extension, though, if there is no extension preceding .chg. So, file.doc.chg will become file.doc.doc, but a doc file renamed file.chg will not become file.doc.
I figured this must be some obscure feature, but I googled, and I couldn't find anything about it. I've tried it on both Windows XP and Windows 2000. I'm surprised I couldn't find any other information, so I don't know if others have noticed this, and just never pointed it out, or what.
And for some reason, downloading test.jpg.chg on Windows 2000 gives you test.jpg.jpg, but on Windows XP gives you test.jpg.jpeg.
I discovered this when I needed to download something from my server, but the network the computer I was using was attached to wouldn't allow downloads of certain file extensions. So I connected to my server with UltraVNC, and changed the file's extension from file.mp3 to file.mp3.chg (chg meaning, of course, "Change", as in, "Change this extension back"). But then, when I downloaded the file, it automatically changed from file.mp3.chg to file.mp3.mp3!
I've tried this with numerous extensions, and it seems to work for all that I've encountered. It will not change the extension, though, if there is no extension preceding .chg. So, file.doc.chg will become file.doc.doc, but a doc file renamed file.chg will not become file.doc.
I figured this must be some obscure feature, but I googled, and I couldn't find anything about it. I've tried it on both Windows XP and Windows 2000. I'm surprised I couldn't find any other information, so I don't know if others have noticed this, and just never pointed it out, or what.
And for some reason, downloading test.jpg.chg on Windows 2000 gives you test.jpg.jpg, but on Windows XP gives you test.jpg.jpeg.
Comments
On another note: WTH.
on another note: clever.
i'd ignore it unless it becomes a problem
So if my guess is right, the logic would be something like this--if a file extension is unrecognized, check for a recognized file extension within the document name. If no extension is found within the name, do nothing. If an extension is found, change unrecognized extension to match recognized extension.
This would explain why your googling turned up nothing, if you were focusing on googling for the ".chg" extension.
What sort of server are we speaking of here? Apache? or IIS?
<!--QuoteEnd--></div><!--QuoteEEnd-->
Apache.
Edit: I took your suggestion, Cxwf, and file.mp3.zzz works too. So I think you must be right. Either way, though, its still good to know.