Cool Discovery using the extension ".chg" on a server

MantridMantrid Lockpick Join Date: 2003-12-07 Member: 24109Members
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.

Comments

  • RoverRover blargh Join Date: 2003-09-23 Member: 21139Members
    I'm definately one of the people that it doesn't interest.


    On another note: WTH.
  • TykjenTykjen Join Date: 2003-01-21 Member: 12552Members, Reinforced - Shadow
    OMG IM DEFINATLY ALSO ONE THAT IT DOESENT INTEREST, AND I WANNA SEE HOW MUCH MANTRID CARES FOR THAT.


    on another note: clever.
  • CabooseCaboose title = name(self, handle) Join Date: 2003-02-15 Member: 13597Members, Constellation
    What sort of server are we speaking of here? Apache? or IIS?
  • BlackMageBlackMage [citation needed] Join Date: 2003-06-18 Member: 17474Members, Constellation
    could be the UA changing the extension...
    i'd ignore it unless it becomes a problem
  • CxwfCxwf Join Date: 2003-02-05 Member: 13168Members, Constellation
    edited February 2007
    My first guess would be that there is nothing special about the extension ".chg", seeing as how you made it up and all. Rather, Windows has a certain pattern it follows with all unrecognizable extensions. Try doing the same trick with something like file.doc.zzz and see if that works too.

    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.
  • MantridMantrid Lockpick Join Date: 2003-12-07 Member: 24109Members
    edited February 2007
    <!--quoteo(post=1608555:date=Feb 21 2007, 09:53 PM:name=Caboose)--><div class='quotetop'>QUOTE(Caboose @ Feb 21 2007, 09:53 PM) [snapback]1608555[/snapback]</div><div class='quotemain'><!--quotec-->
    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.
  • TychoCelchuuuTychoCelchuuu Anememone Join Date: 2002-03-23 Member: 345Members
    I thought this was common knowledge. It's an easy way of backing up files that are created each time a program runs; change it from autoexec.cfg to autoexec.cfgb and the program will make you a new autoexec.cfg, which you can delete if you want to, as long as you rename the autoexec.cfgb back to autoexec.cfg.
Sign In or Register to comment.