LFN: Open File(s) - did that change?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
therube
Posts: 4985
Joined: Thu Sep 03, 2009 6:48 pm

LFN: Open File(s) - did that change?

Post by therube »

LFN (Long File Name): Open File(s) - did that change - $exec("%1")?

I remember with a LFN, > 260 or whatever, the context menu did not display "correctly".
And if you selected multiple files, including the LFN, operations may silently failed.

But I don't recall not being able to click on the file & having it open?

And now it doesn't.
(And if I open the folder, & click on the file, Windows also reports, "The filename or extension is too long".)


A change in there, or am I just not recalling past failures correctly?

Length (Full Name) in this case, 285 chars.
Filename itself is 250 chars.

Code: Select all

Everything
Version 1.4.1.877 (x86)
Windows NT 6.1
Processors 4
IsAdmin 0
AppData 0
Service 1
cmdline "C:\DEV\Locate\Everything.exe"
WM_ACTIVATE 00000000 00000000, lastfocus 0a9e0bd8, current focus 0a9e0bd8
WM_ACTIVATE 00000001 00000000, lastfocus 0a9e0bd8, current focus 00000000
selection: 1/1:
x:\xxx\xxxxxxxx.xx\xxxxxxxxxxxxxxx\xx - xxxxxxx - xxxxxxx xxx xxxx - xxxxx xxxxxx - xxxxx xxxxxxx - xxx xxx xxxx xxxx xxx xxxxx xxxx - xxxxxxx xxxxx xxxxxxx xxxx xxxxxxx xxxxxxxxxx - xxxxxxx xx xxx xxxxx xxxxxxxxxx-xxxxxxxxxx xxxxxxxxxx xxxx   xxxx xxxx-xxxxxxxx-xxxxxxxxxx-xxxxxxx.xxx
exec: first expr
exec: command $exec("%1")
exec: fullfilename
x:\xxx\xxxxxxxx.xx\xxxxxxxxxxxxxxx\xx - xxxxxxx - xxxxxxx xxx xxxx - xxxxx xxxxxx - xxxxx xxxxxxx - xxx xxx xxxx xxxx xxx xxxxx xxxx - xxxxxxx xxxxx xxxxxxx xxxx xxxxxxx xxxxxxxxxx - xxxxxxx xx xxx xxxxx xxxxxxxxxx-xxxxxxxxxx xxxxxxxxxx xxxx   xxxx xxxx-xxxxxxxx-xxxxxxxxxx-xxxxxxx.xxx
exec: depth 0
exec: exec "%1")
exec: depth 1
exec: got
"x:\xxx\xxxxxxxx.xx\xxxxxxxxxxxxxxx\xx - xxxxxxx - xxxxxxx xxx xxxx - xxxxx xxxxxx - xxxxx xxxxxxx - xxx xxx xxxx xxxx xxx xxxxx xxxx - xxxxxxx xxxxx xxxxxxx xxxx xxxxxxx xxxxxxxxxx - xxxxxxx xx xxx xxxxx xxxxxxxxxx-xxxxxxxxxx xxx xxxxxxx xxxx   xxxx xxxx-xxxxxxxx-xxxxxxxxxx-xxxxxxx.xxx"
exec: shellexecute (idlist) file:
x:\xxx\xxxxxxxx.xx\xxxxxxxxxxxxxxx\xx - xxxxxxx - xxxxxxx xxx xxxx - xxxxx xxxxxx - xxxxx xxxxxxx - xxx xxx xxxx xxxx xxx xxxxx xxxx - xxxxxxx xxxxx xxxxxxx xxxx xxxxxxx xxxxxxxxxx - xxxxxxx xx xxx xxxxx xxx xxxxxxx-xxxxxxxxxx xxxxxxxxxx xxxx   xxxx xxxx-xxxxxxxx-xxxxxxxxxx-xxxxxxx.xxx
param:
WM_ACTIVATE 00000000 00ad19ea, lastfocus 025007d0, current focus 025007d0
Enter ShellExecute
Leave ShellExecute
WM_ACTIVATE 00000001 00ad19ea, lastfocus 025007d0, current focus 00ad19ea
ShellExecuteExW(): GetLastError(): 0: failed to execute
x:\xxx\xxxxxxxx.xx\xxxxxxxxxxxxxxx\xx - xxxxxxx - xxxxxxx xxx xxxx - xxxxx xxxxxx - xxxxx xxxxxxx - xxx xxx xxxx xxxx xxx xxxxx xxxx - xxxxxxx xxxxx xxxxxxx xxxx xxxxxxx xxxxxxxxxx - xxxxxxx xx xxx xxxxx xxxxxxxxxx-xxxxxxxxxx xxxxxxxxxx xxxx   xxxx xxxx-xxxxxxxx-xxxxxxxxxx-xxxxxxx.xxx
sub buf killed
set 1 run history in 0.000364 seconds
exec: main thread regained focus
new results
new results
new results
update m 1 7178376
update index E:
USN BASIC_INFO_CHANGE 1b4dd67f29cb1962.automaticDestinations-ms
updated E: in 0.001179 seconds
resume ntfs monitor 1
processed usn records in 0.000243 seconds
DB_WAIT: _db_ready_proc waiting...
DB_WAIT: _db_ready_proc waited 0.000149 seconds
update m 1 7178376
update index E:
USN BASIC_INFO_CHANGE DATA_OVERWRITE 1b4dd67f29cb1962.automaticDestinations-ms
USN BASIC_INFO_CHANGE DATA_OVERWRITE CLOSE 1b4dd67f29cb1962.automaticDestination
s-ms
USN DELETE CLOSE xxxxxxxxxxxxxxx.lnk
USN CREATE xxxxxxxxxxxxxxx.lnk
USN CREATE DATA_EXTEND xxxxxxxxxxxxxxx.lnk
USN CREATE DATA_EXTEND CLOSE xxxxxxxxxxxxxxx.lnk
updated E: in 0.006621 seconds
resume ntfs monitor 1
processed usn records in 0.001747 seconds
DB_WAIT: _db_ready_proc waiting...
DB_WAIT: _db_ready_proc waited 0.000295 seconds
WM_ACTIVATE 00000000 00000000, lastfocus 025007d0, current focus 025007d0
update m 1 7178376
update index E:
And every way I try to open the particular file, fails?
So I guess it is not Everything.

Yet if I do:
> path:len:>259
I come up with other files - all of which do open, lengths of 261-304 chars, except for this particular file ... ?



(I see Win10 has the option to bypass MAX_PATH restrictions.)
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: LFN: Open File(s) - did that change?

Post by NotNull »

therube wrote:LFN (Long File Name): Open File(s) - did that change - $exec("%1")?

I remember with a LFN, > 260 or whatever, the context menu did not display "correctly".
And if you selected multiple files, including the LFN, operations may silently failed.

But I don't recall not being able to click on the file & having it open?

And now it doesn't.
(And if I open the folder, & click on the file, Windows also reports, "The filename or extension is too long".)


And every way I try to open the particular file, fails?
So I guess it is not Everything.

Yet if I do:
> path:len:>259
I come up with other files - all of which do open, lengths of 261-304 chars, except for this particular file ... ?

There is a difference in what the filesystem supports and what the shell (desktop process) supports ..
A simple example of that is a filename ending on a <space>: allowed by the filesystem, but the shell doesn't handle it correctly.
Files with a long path are supported by the filesystem, but not by the shell.
A change in there, or am I just not recalling past failures correctly?
As you are on Win7: I think the latter one (behaviour on Win10 *did* change with newer versions).


Win7 does support "Very LFN's" (it has an official Microsoft-name, which I can't remember).
I did a little experiment for you: If I change the "Open Files" commadn from the default $exec("%1") to:

Code: Select all

$exec( "\\?\%1" )
I was able to open the files. Not tested on very long paths (I don't have these), but should work for those too; the namespace supports it.

NB: the \\?\... syntax is for files; there is also a lower level namespace, \\.\... for files on a device level. That didn't work, although if I changed it to:
$exec( notepad.exe "\\.\%1" ) , notepad did open the file.
NB2: This will not work if you have UNC paths (\\server\share\ ..) in your Everything index.
There is a different "very LFN" for UNC's though.


Long story short: Your Windows shell doesn't support these long paths.
void
Developer
Posts: 16841
Joined: Fri Oct 16, 2009 11:31 pm

Re: LFN: Open File(s) - did that change?

Post by void »

It has not changed, from what I've seen, really long file names (longer than 260 characters) open successfully, unless they are not associated with anything. The shell will attempt to open unassociated files the open-with dialog, but that fails due to the long filename, and in turn shell execute/open in Everything fails.

There have been some changes in Everything 1.4.1 to handling really long file names, where possible Everything will prefix really long filenames with \\?\ , for example when renaming or deleting files.
Post Reply