China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-12 12:29
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Two questions about environment variables View 641 Replies 3
Original Poster Posted 2009-09-03 23:02 ·  中国 广东 中山 电信
初级用户
Credits 102
Posts 47
Joined 2008-11-10 08:29
17-year member
UID 130514
Gender Male
Status Offline
In Vista/7 I see %TEMP% = %USERPROFILE%\AppData\Local\Temp

If the username is very long, for example try_a_very_long_name
then when you output %TEMP% you'll see the username part turn into an 8.3 abbreviated form with "~"
but if you directly echo %username% it is normal. Why is that?

Also, what is %pathtem%?
Floor 2 Posted 2009-09-04 04:31 ·  中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
My understanding is that standalone username is just the user name, just a string, not a path name, so it won't be expanded according to the 8.3 rule.
That rule applies to paths.

%pathtern%
http://vistaonwindows.com/environment_variables.html

Didn't find any explanation.
S smile 微笑,L love 爱,O optimism 乐观,R relax 放松,E enthusiasm 热情...Slore
Floor 3 Posted 2009-09-04 04:36 ·  中国 广东 广州 电信
银牌会员
★★★★
SuperCleaner
Credits 2,362
Posts 1,133
Joined 2008-02-02 21:36
18-year member
UID 110072
Gender Male
Status Offline
RE the poster above:
What the first post mentioned seems to be %pathtem%, not pathtern

As for pathtem, it might be a temporary path ( I've never used it either. Just guessing, guessing, guessing)
Floor 4 Posted 2009-09-04 13:52 ·  中国 广东 中山 电信
初级用户
Credits 102
Posts 47
Joined 2008-11-10 08:29
17-year member
UID 130514
Gender Male
Status Offline
Originally posted by slore at 2009-9-4 04:31:
My understanding is that standalone username is just the user name, just a string, not a path name, so it won't be expanded according to the 8.3 rule.
That rule applies to paths.

%pathtern%
http://vistaonwindo ... But all the other environment variables that represent paths can be displayed in full; only %temp% and %tmp% are exceptions. I don't get it... My system is Windows Vista Home Premium SP1 EN 32-bit The value of %pathtem% is similar to %path%, but not exactly the same I don't know what it is used for
Forum Jump: