Why does the system convert TEMP to a short file name?
When you set environment variables with the System control panel, the
TMP variables are silently converted to their short file name equivalents (if possible). Why is that?
For compatibility, of course.
It is very common for batch files to assume that the paths referred to by the
%TMP% environment variables do not contain any embedded spaces. (Other programs may also make this assumption, but batch files are the most common place where you run into this problem.)
I say “if possible” because you can disable short name generation, in which case there is no short name equivalent, and the path remains in its original long form.
If you are crazy enough to set this value and point your
TMP variables at a directory whose name contains spaces and doesn’t have a short name, then you get to see what sorts of things stop working properly. Don’t say I didn’t warn you.