Fun Windows trick

Discussion in 'Software' started by XTAL256, Sep 27, 2010.

  1. XTAL256

    XTAL256 Private First Class

    I just discovered a funny thing you can do with Windows' environment variables. Did you know that it will allow you to create a variable with "\" in the name, and that it will not be able to distinguish that "\" from an ordinary file path separator?

    Try this:
    1) Go to advanced system settings then go to the Environment Variable dialog.
    2) Create a new user variable - call it "some\variable" and give it a value "123"
    3) Create a folder anywhere on the system - call it "%some"
    4) Within that folder, create a file - call it "variable%.txt"
    5) Try to access that file by typing in it's path in explorer or cmd - e.g. "C:\%some\variable%.txt"
    6) Windows will say "Windows can't find 'C:\123.txt'. Check the spelling and try again." :)

    EDIT: Even funnier, you can actually call a file or folder "%temp%.txt"
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds