Long file names - a few questions

May 20, 2008
11,285
95
Syracuse, NY, USA
I revisited the "longest fully-qualified file name" question. I used this BTM.
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]
It told me
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
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?
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
 
May 20, 2008
11,285
95
Syracuse, NY, USA
Never mind the bit about @FILESIZE. I left out a character in the path when I copied and pasted. It works with and without "\\?". The quoting is necessary.
 
Similar threads
Thread starter Title Forum Replies Date
nickles Fixed Executing long command lines in a batch generates file name errors Support 16
L File completion window saws long paths Support 3
R Long commands retrieved from command history have blank line when wrapped Support 20
Stefano Piccardi echoerr truncates long lines Support 9
Roedy WAD Minor long-standing install problems Support 6
W Copy+Paste without breaking long lines as default? Support 1
M An issue I really don't understand and is too long and detailed for this "Title" line... Support 16
vefatica @LINES, long lines, TCC disappears Support 7
Q tcc.exe crash with long command line Support 10
I TCC crashes on gosub after long command line Support 0
nickles OPTION "trims" long ColorDir directive Support 1
L Very long startup times - solved for me Support 15
A TCMD takes very long to start up Support 19
thorntonpg file explorer - short cut keys Support 0
JohnQSmith New online help file wrong logo Support 7
Jay Sage WAD Possible Bug With OPTION Command With @FILE Support 5
samintz How to? swap endianness in a binary file Support 12
vefatica `Back quotes` - command line vs. batch file Support 5
fpefpe How to? batch file size Support 2
Jay Sage Issues With TCMD File Explorer Support 0
FreezerBurnt Help making a CMD and TCC compatible batch file Support 7
Joe Caverly @FILESIZE and NTFS File Stream Support 1
Joe Caverly Embedding an .EXE (or other file) into a .BTM Support 8
U Command help on file names Support 5
S Concatenate all playlists into 1 file Support 22
Joe Caverly Set a batch variable (%1 - %n) when TCC is executing a batch file Support 5
Joe Caverly Rename file that begins with Emoji Support 7
Joe Caverly PSHELL and NTFS File Streams Support 2
P Kill all other instances of tcc from a btm batch file Support 2
D ffind hangs on large file Support 18
Alpengreis Documentation Minor issue in help file for view /E Support 1
fpefpe batch file ending early Support 18
J Licesne file location Support 1
K robocopy cancelling batch file processing Support 28
Jay Sage TCMD Crashes with "tctoolbar /c /r file" Support 5
A Unable to pass batch file arguments unaltered Support 18
MikeBaas How to...extract a string from a .json-file? Support 10
vefatica LIBRARY and file name completion? Support 4
D What does the file "..\Everything\Run history.csv" store? Support 5
H Takecommand.pdf failed not a pdf file Support 6
Joe Caverly DIRectory Colorization in v25 Help File Support 0
C show file description? with dir? Support 8
D When copying/moving, appending " (2)" to filename when the target file already exist. Support 7
R How to? Dir specific file search patterns with spaces in the pathnames? Support 6
Joe Caverly _EXPANSION in help file Support 0
Stefan Hassel Installation file TC 24.02 Build 47 is actually version 25.00.1 Support 10
vefatica Are @FILEDATE[file] and @FILEDATE[file,u] ever different? Support 2
K_Meinhard Help file error Support 1
Joe Caverly JOBMONITOR in Help File Support 1
D btm file command line augments comparing for string or math. Support 12

Similar threads