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-24 18:03
中国DOS联盟论坛 » WinPE、PowerShell及其它命令行系统专区 » [Discussion] 8.3 Filename View 3,230 Replies 3
Original Poster Posted 2006-06-13 15:26 ·  IANA 局域网IP(Private-Use)
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Recently, I have read a lot of discussions about "abnormal directories" and have gained a lot. I have come up with several questions:

1. For the format paths of 8.3 format and long filenames, which one will the system search preferentially? (For example, there are both C:\Program Files and C:\progra~1 directories in the computer)

2. According to the principle of permutation and combination, the short filename can represent at most 9 filenames/directory names with the same first 8 characters. Then, actually test it. Create 20 directories, namely:

aaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaa (1)
aaaaaaaaaaaaaaaaaaaaa (2)
aaaaaaaaaaaaaaaaaaaaa (3)
.....
aaaaaaaaaaaaaaaaaaaaa (20)

dir /x shows:

AAAAAA~1
AAAAAA~2
AAB2DC~1
AAB2EC~1
AAB2FC~1
AAB20D~1
AAB21D~1
AAB22D~1
AAB23D~1
AAB24D~1
AAB25D~1
AAB26D~1
AAAAAA~3
AAC2D4~1
AAC2E4~1
AAC2F4~1
AAC205~1
AAC215~1
AAC225~1
AAC235~1
AAC245~1
AAC255~1
AAC265~1
AAAAAA~4
AAC2DC~1
AAC2EC~1
AA4064~1
AA406C~1
AA5064~1
AA506C~1
AA6064~1

What is the pattern here?

3. Create a D:\...\ directory, and it will display D:\e2e2~1. How to explain this?

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 2 Posted 2006-06-14 01:15 ·  加拿大 Bell
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
In fact, this is an extremely non-standard short filename generation method under NT CMD, and it can even be regarded as a bug. However, there is no such problem under pure DOS and Win9x.

Regarding E2E2~1, it should actually be interpreted as 2E 2E, which are the hexadecimal codes of the two characters "..". And because it is different from its corresponding long filename, the number suffix ~1 is added.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 3 Posted 2007-04-25 11:03 ·  中国 湖北 黄冈 电信
高级用户
★★★
Credits 894
Posts 411
Joined 2007-02-17 12:15
19-year member
UID 79697
Gender Male
Status Offline
This situation can also occur when the file name contains spaces and is particularly short.
@set c= 不知则觉多,知则觉少,越知越多,便觉越来越少. --- 知多少.
@for,/l,%%i,in,(1,1,55)do,@call,set/p=%%c:~%%i,1%%<nul&ping/n 1 127.1>nul


Floor 4 Posted 2010-03-06 23:51 ·  中国 广西 电信
初级用户
Credits 67
Posts 40
Joined 2007-11-05 20:02
18-year member
UID 101808
Gender Male
Status Offline
Forum Jump: