## Add trailing backslash to name for folders

Have a suggestion for "Everything"? Please post it here.
horst.epp
Posts: 559
Joined: Fri Apr 04, 2014 3:24 pm

### Add trailing backslash to name for folders

Please add optional a trailing backslash to the name field in the GUI if this is a directory.
This will help a lot for scripting in Total Commander.
TC currently requires a backslash at the end of directories.
Last edited by therube on Tue Oct 12, 2021 7:37 pm, edited 1 time in total.
Reason: s/traling/trailing/

NotNull
Posts: 3196
Joined: Wed May 24, 2017 9:22 pm

### Re: Add traling backslash to name for folders

From the TODO list (What's Next for Everything 1.5a):
• add an option to include a trailing backslash for directories when using copy as path and exporting to txt.

void
Posts: 7759
Joined: Fri Oct 16, 2009 11:31 pm

### Re: Add traling backslash to name for folders

add an option to include a trailing backslash for directories when using copy as path and exporting to txt.
Would this help for your case horst.epp ?

horst.epp
Posts: 559
Joined: Fri Apr 04, 2014 3:24 pm

### Re: Add traling backslash to name for folders

void wrote:
Mon Oct 11, 2021 10:19 am
add an option to include a trailing backslash for directories when using copy as path and exporting to txt.
Would this help for your case horst.epp ?
No, unfortunately not.
The current scripting solution reads the GUI with help of SysListView321 in AHK.
So the name field of the GUI must have the \
Additionaly it would be of help if the command line tool es.exe had an option to add the \ to dirs.

void
Posts: 7759
Joined: Fri Oct 16, 2009 11:31 pm

### Re: Add traling backslash to name for folders

I'll add this to my TODO list.

NotNull
Posts: 3196
Joined: Wed May 24, 2017 9:22 pm

### Re: Add traling backslash to name for folders

horst.epp wrote:
Mon Oct 11, 2021 10:27 am
No, unfortunately not.
The current scripting solution reads the GUI with help of SysListView321 in AHK.
So the name field of the GUI must have the \
I didn't check the current method, but the following code should work whan the suggestion on the todo list is implemented.

It will generate a UTF-8 BOM encoded textfile with the selected filenames in Everything (CTRL+A to select all filenames).

Press Win+Z to generate this list.

Warning: mostly untested, but the 2 runs I did with it went OK.

Code: Select all

#NoEnv
#singleinstance force
SetWorkingDir %A_ScriptDir%

$EVERYTHING_IPC_ID_FILE_COPY_FULL_PATH_AND_NAME := 41007 ; Output file$OutFile := "t:\evlist2tc.txt"

;	Default file encoding
FileEncoding, UTF-8

SetTitleMatchMode, Regex

#IfWinActive ahk_class ^EVERYTHING
#z::
{
$ClipOrg := Clipboard Clipboard := "" SendMessage, 0x111, %$EVERYTHING_IPC_ID_FILE_COPY_FULL_PATH_AND_NAME%,,, A

FileDelete, %$OutFile% FileAppend, %Clipboard%, %$OutFile%

Clipboard := \$ClipOrg
}

#IfWinActive



But in the end, it is a bug on the Total Commander side of things: some folders need a trailing backslash, whereas some others don't need this. I am positive that it will get fixed in the near future.

horst.epp
Posts: 559
Joined: Fri Apr 04, 2014 3:24 pm

### Re: Add traling backslash to name for folders

2NotNull
We also have a working solution which only needs one hotkey while using the Everything GUI.
As long as the proposed Everything change is not available or Christian corrects the Loadlist command
there are restrictions for folder names in the result.

See the TC forum topic for the current solution
https://www.ghisler.ch/board/viewtopic.php?t=75439

I tested your script and it doesn't work.
1. You have to be in the result list to get anything (our solution works even when you are still in the search bar).
2. I only get the first line from the whole GUI results.

NotNull
Posts: 3196
Joined: Wed May 24, 2017 9:22 pm

### Re: Add traling backslash to name for folders

This was only the Everything part of it, for demo purposes. Just to show that the suggestion on the todo list would be enough to export with a trailing \

As said, you need to select some files in the result list (CTRL+A to select them all) and those filenames will be saved to a text file.
That way you can "export" only the filenames you are interested in.

If I understand correctly, you are combining Path + Name fields (Path + \ + Name).
Then there is an even much easier solution that works right now: Just add a \ after foldernames as well as fileames (Path + \ + Name + \ ).
TC accepts filenames ending in a \ too, so no further workaround needed!

horst.epp
Posts: 559
Joined: Fri Apr 04, 2014 3:24 pm

### Re: Add traling backslash to name for folders

NotNull wrote:
Mon Oct 11, 2021 2:07 pm
This was only the Everything part of it, for demo purposes. Just to show that the suggestion on the todo list would be enough to export with a trailing \

As said, you need to select some files in the result list (CTRL+A to select them all) and those filenames will be saved to a text file.
That way you can "export" only the filenames you are interested in.

If I understand correctly, you are combining Path + Name fields (Path + \ + Name).
Then there is an even much easier solution that works right now: Just add a \ after foldernames as well as fileames (Path + \ + Name + \ ).
TC accepts filenames ending in a \ too, so no further workaround needed!
I don't want to select anything just copy the whole GUI result.
Unfortunately TCs LOADLIST does not accept file names with a \ at the end (just tested it)

NotNull
Posts: 3196
Joined: Wed May 24, 2017 9:22 pm

### Re: Add traling backslash to name for folders

horst.epp wrote:
Mon Oct 11, 2021 3:59 pm
I don't want to select anything just copy the whole GUI result.
The original request came from @davidcarta.

Unfortunately TCs LOADLIST does not accept file names with a \ at the end (just tested it)
2021-10-11 18_09_36-(1) Add traling backslash to name for folders - voidtools forum — Mozilla Firefo.png (79.25 KiB) Viewed 1866 times

horst.epp
Posts: 559
Joined: Fri Apr 04, 2014 3:24 pm

### Re: Add traling backslash to name for folders

2NotNull
If a select some files in the GUI I get a list from your script but its not accepted by LOADLIST.
The complete lines are enclosed with "" which is not accepted at all.
Screenshot - 11.10.2021 , 19_49_38.png (13.7 KiB) Viewed 1859 times

Code: Select all

"C:\Temp\Download\Everything"
"C:\Tools\Everything"
"D:\Backup\Everything"
"C:\Users\horst\AppData\Local\EverythingToolbar"
"C:\Users\horst\AppData\Roaming\EverythingToolbar"
"C:\Users\horst\Music\YouTube\Bryan Adams - (Everything I Do) I Do It For You, LIVE - SPECIAL EDIT.mp4"
"C:\Tools\AutoHotkey\Scripts\Create File from Everything content.ahk"
"C:\Tools\XYplorer\Data\Scripts\Create XYplorer paperfolder from Everything content.ahk"
"C:\Tools\XYplorer\Data\Scripts\Create XYplorer paperfolder from Everything content.exe"
"C:\Users\horst\AppData\Roaming\Microsoft\Windows\Recent\Everything-1.5.0.1279a.x64.zip.lnk"
"C:\Tools\Everything\Icons\Everything-Blue.ico"
"C:\Tools\Everything\Icons\Everything-Chartreuse.ico"
"C:\Tools\Everything\Icons\Everything-Cyan.ico"
"C:\Tools\Everything\Icons\Everything-Green.ico"
"C:\Users\horst\AppData\Roaming\Microsoft\Windows\Recent\Everything-Green.ico.lnk"
"C:\Tools\Everything\Icons\Everything-Grey.ico"
"C:\Tools\Everything\Icons\Everything-Magenta.ico"
"C:\Tools\Everything\Icons\Everything-Orange.ico"
"C:\Tools\Everything\Icons\Everything-Pink.ico"
"C:\Tools\Everything\Icons\Everything-Purple.ico"
"C:\Tools\Everything\Icons\Everything-Red.ico"
"C:\Tools\Everything\Icons\Everything-SkyBlue.ico"
"C:\Tools\Everything\Icons\Everything-SpringGreen.ico"
"C:\Tools\Everything\Icons\Everything-Yellow.ico"
"C:\Users\horst\AppData\Roaming\Microsoft\Windows\Recent\Everything-Yellow.ico.lnk"
"C:\Tools\Everything\Everything Search Engine.URL"
"C:\Tools\EnvTool\src\Everything.c"
"C:\Tools\Everything\Everything.chm"
"C:\Tools\Everything\Everything.db"
"C:\Tools\FreeCommander\Settings\FileContainers\everything.fcc"
"C:\Users\horst\AppData\Roaming\Microsoft\Windows\Recent\everything.fcc.lnk"
"C:\Tools\EnvTool\src\Everything.h"
"C:\Tools\Everything\Everything.ico"
"C:\Tools\Everything\Everything.ini"
"C:\Tools\XYplorer\Data\Scripts\Everything.ini"
"D:\Backup\Everything\Everything.ini"
"C:\Users\horst\AppData\Roaming\Microsoft\Windows\Recent\Everything.ini.lnk"
"C:\Users\horst\AppData\Roaming\Microsoft\Windows\Recent\Everything.lnk"
"C:\Temp\Test2\Everything.txt"
"C:\Temp\x\Everything.txt"
"C:\Tools\Wincmd\Scripts\Everything.txt"
"C:\Tools\XYplorer\Data\Paper\Everything.txt"
"C:\Users\horst\AppData\Roaming\Microsoft\Windows\Recent\Everything.txt.lnk"
"C:\Tools\Everything\Everything.URL"
"C:\Users\horst\Desktop\URLs\Foren\Everything.url"
"C:\Tools\XYplorer\Data\Scripts\Everything.xys"
"C:\Tools\Everything\Everything_as_search.reg"
"C:\Tools\AutoHotkey\Scripts\Everything_findstring.ahk"
"C:\Tools\EnvTool\src\everything_ipc.h"
"C:\Users\horst\AppData\Roaming\Microsoft\Windows\Recent\Everything_v0.9.4.xys.lnk"
"C:\Users\horst\AppData\Roaming\Microsoft\Windows\Recent\Everything_v0.9.5.xys.lnk"
"C:\Users\horst\AppData\Roaming\Microsoft\Windows\Recent\Everything_v0.9.6.xys.lnk"
"C:\Tools\Everything\Toolbar\Everything64.dll"
"C:\Tools\Everything\Everything64.exe"
"C:\Windows\Prefetch\EVERYTHING64.EXE-E8690DA7.pf"
"C:\Users\horst\AppData\Local\Microsoft\CLR_v4.0\UsageLogs\Everything64.exe.log"
"C:\Tools\Everything\EverythingFileAssociations.cmd"
"C:\Tools\Everything\EverythingFileAssociations.ini"
"C:\Tools\Everything\Toolbar\EverythingToolbar.dll"
"C:\Tools\Everything\Toolbar\EverythingToolbar.pdb"
"C:\Tools\Everything\Toolbar\de\EverythingToolbar.resources.dll"
"C:\Tools\XYplorer\Data\Scripts\EverythingXYplorer.xys"
"C:\Users\horst\AppData\Roaming\Microsoft\Windows\Recent\EverythingXYplorer.zip.lnk"
"C:\Tools\Wincmd\Scripts\ExportEverythingWindow.ahk"
"C:\Tools\Wincmd\Scripts\ExportEverythingWindow.exe"
"C:\Windows\Prefetch\EXPORTEVERYTHINGWINDOW.EXE-693381F4.pf"
"C:\Tools\Wincmd\Scripts\ExportEverythingWindow.ini"
"C:\Windows\Panther\GIVa4Co8skqnOhxK.9.4.0.0_APPRAISER_EverythingSys.bin"
"C:\Windows\Panther\GIVa4Co8skqnOhxK.9.8.0.0_APPRAISER_EverythingAppInteresting.bin"
"C:\Windows\Panther\GIVa4Co8skqnOhxK.9.8.0.0_APPRAISER_EverythingAppUninteresting.bin"
"C:\Windows\Panther\GIVa4Co8skqnOhxK.9.8.0.0_APPRAISER_EverythingDevInteresting.bin"
"C:\Windows\Panther\GIVa4Co8skqnOhxK.9.8.0.0_APPRAISER_EverythingDevUninteresting.bin"
"C:\Tools\Everything\Toolbar\Releases · stnklEverythingToolbar.URL"
"C:\Program Files\WindowsApps\DellInc.MyDell_1.91.7.0_x64__htrsf667h5kn2\Data\Dell\Articles\cs\Windows and Personalization\SearchEverything.htm"
"C:\Program Files\WindowsApps\DellInc.MyDell_1.91.7.0_x64__htrsf667h5kn2\Data\Dell\Articles\da\Windows and Personalization\SearchEverything.htm"
"C:\Program Files\WindowsApps\DellInc.MyDell_1.91.7.0_x64__htrsf667h5kn2\Data\Dell\Articles\de\Windows and Personalization\SearchEverything.htm"
"C:\Program Files\WindowsApps\DellInc.MyDell_1.91.7.0_x64__htrsf667h5kn2\Data\Dell\Articles\el\Windows and Personalization\SearchEverything.htm"
"C:\Program Files\WindowsApps\DellInc.MyDell_1.91.7.0_x64__htrsf667h5kn2\Data\Dell\Articles\en\Windows and Personalization\SearchEverything.htm"
"C:\Program Files\WindowsApps\DellInc.MyDell_1.91.7.0_x64__htrsf667h5kn2\Data\Dell\Articles\es\Windows and Personalization\SearchEverything.htm"
"C:\Program Files\WindowsApps\DellInc.MyDell_1.91.7.0_x64__htrsf667h5kn2\Data\Dell\Articles\fi\Windows and Personalization\SearchEverything.htm"
"C:\Program Files\WindowsApps\DellInc.MyDell_1.91.7.0_x64__htrsf667h5kn2\Data\Dell\Articles\fr\Windows and Personalization\SearchEverything.htm"
"C:\Program Files\WindowsApps\DellInc.MyDell_1.91.7.0_x64__htrsf667h5kn2\Data\Dell\Articles\hu\Windows and Personalization\SearchEverything.htm"
"C:\Program Files\WindowsApps\DellInc.MyDell_1.91.7.0_x64__htrsf667h5kn2\Data\Dell\Articles\it\Windows and Personalization\SearchEverything.htm"
"C:\Program Files\WindowsApps\DellInc.MyDell_1.91.7.0_x64__htrsf667h5kn2\Data\Dell\Articles\ja\Windows and Personalization\SearchEverything.htm"
"C:\Program Files\WindowsApps\DellInc.MyDell_1.91.7.0_x64__htrsf667h5kn2\Data\Dell\Articles\ko\Windows and Personalization\SearchEverything.htm"
"C:\Program Files\WindowsApps\DellInc.MyDell_1.91.7.0_x64__htrsf667h5kn2\Data\Dell\Articles\nb\Windows and Personalization\SearchEverything.htm"
"C:\Program Files\WindowsApps\DellInc.MyDell_1.91.7.0_x64__htrsf667h5kn2\Data\Dell\Articles\nl\Windows and Personalization\SearchEverything.htm"
"C:\Program Files\WindowsApps\DellInc.MyDell_1.91.7.0_x64__htrsf667h5kn2\Data\Dell\Articles\pl\Windows and Personalization\SearchEverything.htm"
"C:\Program Files\WindowsApps\DellInc.MyDell_1.91.7.0_x64__htrsf667h5kn2\Data\Dell\Articles\pt-BR\Windows and Personalization\SearchEverything.htm"
"C:\Program Files\WindowsApps\DellInc.MyDell_1.91.7.0_x64__htrsf667h5kn2\Data\Dell\Articles\pt-PT\Windows and Personalization\SearchEverything.htm"
"C:\Program Files\WindowsApps\DellInc.MyDell_1.91.7.0_x64__htrsf667h5kn2\Data\Dell\Articles\ro\Windows and Personalization\SearchEverything.htm"
"C:\Program Files\WindowsApps\DellInc.MyDell_1.91.7.0_x64__htrsf667h5kn2\Data\Dell\Articles\ru\Windows and Personalization\SearchEverything.htm"
"C:\Program Files\WindowsApps\DellInc.MyDell_1.91.7.0_x64__htrsf667h5kn2\Data\Dell\Articles\sk\Windows and Personalization\SearchEverything.htm"
"C:\Program Files\WindowsApps\DellInc.MyDell_1.91.7.0_x64__htrsf667h5kn2\Data\Dell\Articles\sl\Windows and Personalization\SearchEverything.htm"
"C:\Program Files\WindowsApps\DellInc.MyDell_1.91.7.0_x64__htrsf667h5kn2\Data\Dell\Articles\sv\Windows and Personalization\SearchEverything.htm"
"C:\Program Files\WindowsApps\DellInc.MyDell_1.91.7.0_x64__htrsf667h5kn2\Data\Dell\Articles\tr\Windows and Personalization\SearchEverything.htm"
"C:\Program Files\WindowsApps\DellInc.MyDell_1.91.7.0_x64__htrsf667h5kn2\Data\Dell\Articles\uk\Windows and Personalization\SearchEverything.htm"
"C:\Program Files\WindowsApps\DellInc.MyDell_1.91.7.0_x64__htrsf667h5kn2\Data\Dell\Articles\zh-Hans\Windows and Personalization\SearchEverything.htm"
"C:\Program Files\WindowsApps\DellInc.MyDell_1.91.7.0_x64__htrsf667h5kn2\Data\Dell\Articles\zh-Hant\Windows and Personalization\SearchEverything.htm"
"C:\Users\horst\AppData\Roaming\Microsoft\Windows\Recent\XYplorer - Export Everything window to txt.xys.lnk"


NotNull
Posts: 3196
Joined: Wed May 24, 2017 9:22 pm

### Re: Add traling backslash to name for folders

Then LOADLIST is even more "crippled" than expected ..
If you are going to suggest better handling of backslashes, maybe ask for support of quoted filenames too.

My code was thrown together in a couple of minutes as a proof of concept; it is not fail-safe or fool-proof. I have no intention to make this in a fully working program. If you like the approach, integrate it in your current code. If not: fine too.

But .. if you want to test it, uncheck Double quote copy as path in the Everything Options (General > Results) and see if that helps.

On the other hand: If I were you, I would simply add the trailing backslash to your existing code and call it a day.

horst.epp
Posts: 559
Joined: Fri Apr 04, 2014 3:24 pm

### Re: Add traling backslash to name for folders

I'm happy with my current version as most results are files and not dirs.
I will just wait for an Everything option or TC update, whatever comes first.
My normal usage of Everything from TC is by the integrated searches with TC.
So all is fine.

nspp
Posts: 9
Joined: Tue Oct 27, 2020 8:57 am

### Re: Add traling backslash to name for folders

Why not asking for real solution from Everything i.e
A) export filelist with backslash to a default file location with hotkey ?
B) dedicated search keyword to get from TC last result from the Ev GUI
C) scripting API with macro support
...

File type is known if you add the type column on EV gui !
With AHK you can get file type and add yourself backslash from the list, even if it take more time with the column you to not have to check file yourself.

From TC using ev: ed: ... you can directly call Everything engine and do not need the Ev UI at all..

ovg
Posts: 258
Joined: Thu Oct 27, 2016 7:19 pm

### Re: Add traling backslash to name for folders

horst.epp
Posts: 559
Joined: Fri Apr 04, 2014 3:24 pm

### Re: Add traling backslash to name for folders

nspp wrote:
Tue Oct 12, 2021 6:31 am
From TC using ev: ed: ... you can directly call Everything engine and do not need the Ev UI at all..
I know that and I use the Everything integration from its first version.
But there are many cases for which the script solution is much better.
If you are in the Everything GUI and play with bookmarks for example
you cant use them from TC.
Or changing your search rules in the GUI until you see the expected results.
Its just the press of an hotkey to get them into TC with the script solution.
You can't get that by using TCs ev: over and over again.

nspp
Posts: 9
Joined: Tue Oct 27, 2020 8:57 am

### Re: Add traling backslash to name for folders

I have to agree that everything search Ui is more fun than TC or command line EV to add criteria during search.

What i do most of the time is to use Loadlist to keep a search result and then navigate to files or folder using ^-> or ^<-

I have TC entries in system context menu to jump to file in TC Source or Target ... this is directly available from Everything UI. which keep my list on it's own UI.

horst.epp
Posts: 559
Joined: Fri Apr 04, 2014 3:24 pm

### Re: Add traling backslash to name for folders

I also have context menu entries for several file managers
(TC, XYplorer, Free Commander) in Everything.
I never use the native search features of any file manager (XYplorer has the best).

void
Posts: 7759
Joined: Fri Oct 16, 2009 11:31 pm

### Re: Add trailing backslash to name for folders

Everything 1.5.0.1280a adds a folder_append_path_separator ini setting.

To show a trailing path separator for folders:
• In Everything, type in the following search and press ENTER:
/folder_append_path_separator=1
• If successful, folder_append_path_separator=1 is shown in the status bar for a few seconds.

Trailing path separators for folders are added by the database API.
So this will affect results in ES and other requests.

This option is experimental.
I've tested the basic actions (open/cut/copy/paste/rename/delete/properties) but it might break with other actions.
Please let me know if you run into any issues.

horst.epp
Posts: 559
Joined: Fri Apr 04, 2014 3:24 pm

### Re: Add trailing backslash to name for folders

My tests with 3 file managers Total Commander (TC), XYplorer (XY) and Free Commander (FC) shows some problems.
The display of a path is showing \\ at the end but this is mostly cosmetic.
Free commander can't handle dir names with \ at the end.

With this test results I will stay with the new option disabled:
For TC we already have a script which adds the \ where necessary.
XY runs without any changes.
FC runs with almost the same script as TC.

horst.epp
Posts: 559
Joined: Fri Apr 04, 2014 3:24 pm

### Re: Add trailing backslash to name for folders

I think folder_append_path_separator should not add a \ to the Path field.
Scripts or tools know that the content of this field is a path.
It should only add the \ to the dir entries in the name field.
That would solve the \\ entries found in several tools.