File paths that exceed 180 bytes become short,can't open file

Found a bug in "Everything"? report it here
Post Reply
AutoSoft
Posts: 30
Joined: Fri Jun 09, 2023 9:56 am

File paths that exceed 180 bytes become short,can't open file

Post by AutoSoft »

File paths that exceed 180 bytes become short, making it impossible to double-click files that open the search results list.
My folder has Chinese and spaces, so the path is longer. I moved the files to my superiors in turn, and the search results changed and I was ready to open.
void
Developer
Posts: 17152
Joined: Fri Oct 16, 2009 11:31 pm

Re: File paths that exceed 180 bytes become short,can't open file

Post by void »

Everything doesn't have a file name length limit.

What is the exact error? Can you please send a screenshot?
The Windows shell is limited to 259 characters.

To search for files/folders over 259 characters, include the following in your search:
path:len:>259
AutoSoft
Posts: 30
Joined: Fri Jun 09, 2023 9:56 am

Re: File paths that exceed 180 bytes become short,can't open file

Post by AutoSoft »

void wrote: Sun Jun 11, 2023 3:04 am Everything doesn't have a file name length limit.

What is the exact error? Can you please send a screenshot?
The Windows shell is limited to 259 characters.

To search for files/folders over 259 characters, include the following in your search:
path:len:>259
---------------------------
---------------------------
Invalid command line argument 'webview2\01vb6 pure source code calls WEBVIEW2\GOOD\08 optimized version\V2\CALLWE~1.BAS'。
---------------------------
if full file path is too long,(If the file name is too long)it will be change to short filename,so can't open file for double click
the filename is :CallWebView.bas
vb6.exe open *.bas file type
---------------------------
i have a test,vb6.exe not support shortfilename

Code: Select all


Private Declare Function GetShortPathName Lib "kernel32" _
  Alias "GetShortPathNameA" (ByVal lpszLongPath As String, _
  ByVal lpszShortPath As String, _
  ByVal cchBuffer As Long) As Long
  
  Function GetShortFile(sFile As String, Optional MaxLen As Long = 555) As String
  Dim ShortFile As String
  Dim lResult As Long
  ShortFile = Space$(MaxLen)
  lResult = GetShortPathName(sFile, ShortFile, Len(ShortFile))
  
  If lResult <> 0 Then
    ShortFile = Left$(ShortFile, InStr(ShortFile, vbNullChar) - 1)
  End If
  GetShortFile = ShortFile
End Function
Last edited by AutoSoft on Sun Jun 11, 2023 3:45 am, edited 1 time in total.
void
Developer
Posts: 17152
Joined: Fri Oct 16, 2009 11:31 pm

Re: File paths that exceed 180 bytes become short,can't open file

Post by void »

Please try disabling shell_short_path:
  • In Everything 1.5, from the Tools menu, click Options.
  • Click the Advanced tab on the left.
  • To the right of Show settings containing, search for:
    short
  • Select shell_short_path.
  • Set the value to: false
  • Click OK.
Please note: Disabling can cause shell extensions to crash.

shell_short_path



Alternatively, select the file and press Ctrl + Shift + C to copy the long path and filename to the clipboard.
AutoSoft
Posts: 30
Joined: Fri Jun 09, 2023 9:56 am

Re: File paths that exceed 180 bytes become short,can't open file

Post by AutoSoft »

still doesn't work
allow_quick_launch_shortcut=0
shell_short_basename=0
shell_short_path=0
void
Developer
Posts: 17152
Joined: Fri Oct 16, 2009 11:31 pm

Re: File paths that exceed 180 bytes become short,can't open file

Post by void »

Everything executes items with IContextMenu::InvokeCommand.

This API is typically limited to 259 characters.



To execute items with ShellExecute and a filename (instead of a PIDL), please try disabling shell_execute_id_list:
  • In Everything 1.5, from the Tools menu, click Options.
  • Click the Advanced tab on the left.
  • To the right of Show settings containing, search for:
    execute
  • Select shell_execute_id_list.
  • Set the value to: false
  • Click OK.
shell_execute_id_list



Please check the debug output when executing the item.

Please check the command line of the process that is opening your BAS file.
-What is being received?
AutoSoft
Posts: 30
Joined: Fri Jun 09, 2023 9:56 am

Re: File paths that exceed 180 bytes become short,can't open file

Post by AutoSoft »

void wrote: Sun Jun 11, 2023 3:56 am Everything executes items with IContextMenu::InvokeCommand.

This API is typically limited to 259 characters.

Please check the command line of the process that is opening your BAS file.
-What is being received?
still show CALLWE~1.BAS
my file is callwebview.bas

you can shell like this:
c:\vb.exe "d:\1.bas"

exe path and file name, both before and after double quotation marks can be added, do not need a short path.
This problem can't be solved at once. Forget about him. Thank you for your help.

Maybe I can develop an ABC.EXE by myself, convert the short path to the growth path, and then use VB6.EXE to open. That is to do an intermediate program, trunk VB6 open way.
If everyting inside can be set separately for each file type of open tool EXE, is also a method. But for a gadget like everything, if you want to do everything perfectly, it will become bigger and bigger, right?

In normal cases, you only need to pass the file name. However, for paths with Spaces, you need to add double quotation marks before and after the file name as parameters

Code: Select all

ShellExecute 0, "runas", "C:\Program Files (x86)\Microsoft Visual Basic 6.0\VB6.EXE", "D:\CallWebView.bas", vbNullString, SW_SHOWNORMAL

Code: Select all

  
  Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" ( _
    ByVal hWnd As Long, _
    ByVal lpOperation As String, _
    ByVal lpFile As String, _
    ByVal lpParameters As String, _
    ByVal lpDirectory As String, _
    ByVal nShowCmd As Long) As Long
    
    ShellExecute 0, "runas", "C:\Program Files (x86)\Microsoft Visual Basic 6.0\VB6.EXE", """D:\CallWebView.bas""", vbNullString, SW_SHOWNORMAL
The full file path is double-quoted before and after, so that passing the short path to VB6 .EXE is no problem. You need to make some changes in your source code

windows can use :
ShellExecute 0, "open","C:\Program Files (x86)\Microsoft Visual Basic 6.0\VB6.EXE", """D:\CallWebView.bas"""
AutoSoft
Posts: 30
Joined: Fri Jun 09, 2023 9:56 am

Re: File paths that exceed 180 bytes become short,can't open file

Post by AutoSoft »

I reinstalled the software and it's ok
Post Reply