Why cannot Everything open LFN file?

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

Why cannot Everything open LFN file?

Post by therube »

Why can't Everything (or Windows Explorer for that matter) open particular LFN files?

Win7 x64.
I have not made any changes (in Windows) regarding LFN (or SFN).

At times, my file names (or paths + names) "grow", often with comments in the name itself.
So it is not unusual for me to have LFN.
Knowing that they are apt to be troublesome, I'll check from time to time path:len:>260.

Most always, regardless of LFN, I can open the files.

Sometimes, like now, I run across one I can't open.
Not from Everything (not from Windows Explorer).

In this particular case, the name (path+name) length is 273 (or so) characters.

Can't open the file - unless I reduce the length of its' name.

Yet I have others files of greater length that do open.
I even have a test file that is 429 chars long, that does open.


So what is "special" about this particular file that it fails?

Code: Select all

Windows cannot find "z:\zzz\....m4a".
Make sure you type the name correctly, and then try again.
Image

https://i.postimg.cc/4ZKJv3d6/Everythin ... little.png
(Different Everything versions, & I shortened the file name, slightly.)
void
Developer
Posts: 16748
Joined: Fri Oct 16, 2009 11:31 pm

Re: Why cannot Everything open LFN file?

Post by void »

Everything will use the shell to open files.

The shell is limited to 260 characters (including the null terminator)

When a filename is longer than 260 characters Windows will try to use the short filename.

For example, if you have the filename:
c:\zzz\zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
zzzzzzzzzzzzzzzzzzzzzzzzz.mp3

Windows will access this file as c:\zzz\zzzzzz~1.mp3

Same applies to the path, for example:
c:\zzz\zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\zzz.mp3

Windows will access this file as c:\zzz\zzzzzz~1\zzz.mp3


You might be seeing some files that have a short filename and some that do not.
See if the filenames have a short filename from a command prompt with the following command:
dir /x
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: Why cannot Everything open LFN file?

Post by therube »

SFN does exist, & I can open the file using the SFN - from a command prompt.
C:\> z:\zzz\zzzzzzzz\zzzzzzzzzzzzzz\zz-zzz~1.mp3

Though when I enter the SFN into a File Open dialog (Gvim, media player, MediaInfo, Notepad), it does not open, returning the LFN in its Open failure message?


From a C:\> prompt, I can open the file in my, media player & Notepad, md5sum.

Code: Select all

C:\> C:\WLIB\PLAYERS\MPlayer\mplayer.exe  z:\zzz\zzzzzzzz\zzzzzzzzzzzzzz\zz-zzz~1.mp3
C:\> notepad  z:\zzz\zzzzzzzz\zzzzzzzzzzzzzz\zz-zzz~1.mp3
C:\> md5sum  z:\zzz\zzzzzzzz\zzzzzzzzzzzzzz\zz-zzz~1.mp3
But not in vim. (Vim/Gvim are in my %PATH%.)
(Actually, it is vim.bat & gvim.bat that are in my %PATH% & ends up running, start "dummy" /b "%VIM_EXE_DIR%\gvim.exe" %*.)

Code: Select all

C:\> gvim  z:\zzz\zzzzzzzz\zzzzzzzzzzzzzz\zz-zzz~1.mp3
(C:\> C:\DEV\VIM\vim81\gvim.exe z:\zzz\zzzzzzzz\zzzzzzzzzzzzzz\zz-zzz~1.mp3 behaves the same as when using the .bat file, above.)

Gvim displays an abbreviated (though still rather long) ellipse'd filename (followed by full path) in its' title bar, & treats it as a [New File].

Code: Select all

(Gvim uses a format of, "name (path)" in its' title bar.)
zz - zzzzzz zzzzz zzzz zz zzz...zz217-zzzzzzz268.mp3 (z:\zzz\zzzzzzzz\zzzzzzzzzzzzzz\)
[actual filename part is longer then shown here, but of that form]
testing.mp3 (z:\abc\abc123)
void
Developer
Posts: 16748
Joined: Fri Oct 16, 2009 11:31 pm

Re: Why cannot Everything open LFN file?

Post by void »

Though when I enter the SFN into a File Open dialog (Gvim, media player, MediaInfo, Notepad), it does not open, returning the LFN in its Open failure message?
These programs might be converting filename parameters to long filenames.
Everything also does this for filename parameters.

For example:
Everything.exe -path c:\progra~1
c:\progra~1 is converted to "c:\program files" internally.
Post Reply