- May
- 13,604
- 201
I revisited the "longest fully-qualified file name" question. I used this BTM.
It told me
Why did it use the "\\?\" notation?
Then I tried to use @FILESIZE on that FQN, with and without "\\?\" and with and without quoting it. Why did they all fail?
I did finally get the size after CD-ing to the file's directory.
Code:
set maxlen=0
do f in /d"%1" /a: /s *
set quoted=%@full["%f"]
set len=%@len[%quoted]
iff %len GT %maxlen then
set maxlen=%len
set maxfile=%quoted
endiff
enddo
echo %maxfile
echo length = %@eval[%maxlen - 2]
Code:
"\\?\C:\Users\vefatica\Application Data\Adobe\Flash Player\APSPrivateData2\0\drm-plug-win-x86\fU27D-Qk2iN2mM3R3nA
gpW05-R4=\SuskIAWiNnhy0kNSYD9EHWWDSh8I=\REZGRERGRTItQzIxNy0zNzZCLUFBRTAtQzU4QkY3ODREQkQw\Qjk2N0Q0QTctNUI2RS0zRTcw
LTlGNDYtQTRGNTBBNzg0RDU1.lic"
length = 253
Then I tried to use @FILESIZE on that FQN, with and without "\\?\" and with and without quoting it. Why did they all fail?
Code:
v:\> echo %@filesize[C:\Users\vefatica\Application <snip>
7D-Qk2iN2mM3R3nAgpW05R4=\SuskIAWiNnhy0kNSYD9EHWWDS <snip>
TctNUI2RS0zRTcwLTlGNDYtQTRGNTBBNzg0RDU1.lic]
-1
v:\> echo %@filesize[\\?\C:\Users\vefatica\Applica <snip>
\fU27D-Qk2iN2mM3R3nAgpW05R4=\SuskIAWiNnhy0kNSYD9EH <snip>
0Q0QTctNUI2RS0zRTcwLTlGNDYtQTRGNTBBNzg0RDU1.lic]
-1
v:\> echo %@filesize["C:\Users\vefatica\Applicatio <snip>
27D-Qk2iN2mM3R3nAgpW05R4=\SuskIAWiNnhy0kNSYD9EHWWD <snip>
QTctNUI2RS0zRTcwLTlGNDYtQTRGNTBBNzg0RDU1.lic"]
-1
v:\> echo %@filesize["\\?\C:\Users\vefatica\Applic <snip>
6\fU27D-Qk2iN2mM3R3nAgpW05R4=\SuskIAWiNnhy0kNSYD9E <snip>
N0Q0QTctNUI2RS0zRTcwLTlGNDYtQTRGNTBBNzg0RDU1.lic"]
-1
I did finally get the size after CD-ing to the file's directory.
Code:
c:\users\very\long\path> echo %@filesize[Qjk2N0Q0QTctNUI2RS0zRTcwLTlGNDYtQTRGNTBBNzg0RDU1.lic]
2353