Add trailing backslash to name for folders

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

Add trailing backslash to name for folders

Post by horst.epp »

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: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Add traling backslash to name for folders

Post by NotNull »

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
Developer
Posts: 16681
Joined: Fri Oct 16, 2009 11:31 pm

Re: Add traling backslash to name for folders

Post by void »

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: 1443
Joined: Fri Apr 04, 2014 3:24 pm

Re: Add traling backslash to name for folders

Post by horst.epp »

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
Developer
Posts: 16681
Joined: Fri Oct 16, 2009 11:31 pm

Re: Add traling backslash to name for folders

Post by void »

Thanks for the reply.

I'll add this to my TODO list.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Add traling backslash to name for folders

Post by NotNull »

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: 1443
Joined: Fri Apr 04, 2014 3:24 pm

Re: Add traling backslash to name for folders

Post by horst.epp »

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: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Add traling backslash to name for folders

Post by NotNull »

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: 1443
Joined: Fri Apr 04, 2014 3:24 pm

Re: Add traling backslash to name for folders

Post by horst.epp »

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: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Add traling backslash to name for folders

Post by NotNull »

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
2021-10-11 18_09_36-(1) Add traling backslash to name for folders - voidtools forum — Mozilla Firefo.png (79.25 KiB) Viewed 66685 times
horst.epp
Posts: 1443
Joined: Fri Apr 04, 2014 3:24 pm

Re: Add traling backslash to name for folders

Post by horst.epp »

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
Screenshot - 11.10.2021 , 19_49_38.png (13.7 KiB) Viewed 66678 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:\Temp\Download\XYplorer\Create XYplorer paperfolder 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:\Tools\Everything\Themes\Download Color themes for Everything - voidtools forum.URL"
"C:\Temp\Download\Everything\Everything-1.5.0.1276a.x64-m1.zip"
"C:\Temp\Download\Everything\Everything-1.5.0.1276a.x64.zip"
"C:\Temp\Download\Everything\Everything-1.5.0.1277a.x64-m1.zip"
"C:\Temp\Download\Everything\Everything-1.5.0.1277a.x64.zip"
"C:\Temp\Download\Everything\Everything-1.5.0.1278a.x64.zip"
"C:\Temp\Download\Everything\Everything-1.5.0.1279a.x64.zip"
"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:\Temp\Download\Everything\Everything-Icons.zip"
"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:\Temp\Download\Everything\Everything-SDK.zip"
"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:\Temp\Download\XYplorer\Everything in XYplorer Enternal Test.xys"
"C:\Temp\Download\XYplorer\Everything in XYplorer.xys"
"C:\Tools\Everything\Everything Search Engine.URL"
"C:\Temp\Download\Everything\Everything Themes 1.1.zip"
"C:\Temp\Download\Everything\Everything Toolbar HijackSearch.pdf"
"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\Download\Everything\Everything.Support.zip"
"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:\Temp\Download\XYplorer\Everything.xys"
"C:\Tools\XYplorer\Data\Scripts\Everything.xys"
"C:\Tools\Everything\Everything_as_search.reg"
"C:\Temp\Download\XYplorer\Everything_Epp.xys"
"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:\Temp\Download\XYplorer\Everything_v0.9.6.xys"
"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:\Temp\Download\Everything\EverythingFileAssociations_2020-01-07.zip"
"C:\Temp\Download\Everything\EverythingTimeRange.zip"
"C:\Temp\Download\Everything\EverythingTimeRange_1.1.zip"
"C:\Temp\Download\Everything\EverythingToolbar-0.7.2.msi"
"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:\Temp\Download\XYplorer\EverythingXYplorer.zip"
"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:\Temp\Download\Everything\Start-Everything.zip"
"C:\Temp\Download\XYplorer\XYplorer - Export Everything window to txt.xys"
"C:\Users\horst\AppData\Roaming\Microsoft\Windows\Recent\XYplorer - Export Everything window to txt.xys.lnk"
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Add traling backslash to name for folders

Post by NotNull »

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: 1443
Joined: Fri Apr 04, 2014 3:24 pm

Re: Add traling backslash to name for folders

Post by horst.epp »

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: 10
Joined: Tue Oct 27, 2020 8:57 am

Re: Add traling backslash to name for folders

Post by nspp »

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..
horst.epp
Posts: 1443
Joined: Fri Apr 04, 2014 3:24 pm

Re: Add traling backslash to name for folders

Post by horst.epp »

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: 10
Joined: Tue Oct 27, 2020 8:57 am

Re: Add traling backslash to name for folders

Post by nspp »

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: 1443
Joined: Fri Apr 04, 2014 3:24 pm

Re: Add traling backslash to name for folders

Post by horst.epp »

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
Developer
Posts: 16681
Joined: Fri Oct 16, 2009 11:31 pm

Re: Add trailing backslash to name for folders

Post by void »

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: 1443
Joined: Fri Apr 04, 2014 3:24 pm

Re: Add trailing backslash to name for folders

Post by horst.epp »

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: 1443
Joined: Fri Apr 04, 2014 3:24 pm

Re: Add trailing backslash to name for folders

Post by horst.epp »

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.
void
Developer
Posts: 16681
Joined: Fri Oct 16, 2009 11:31 pm

Re: Add trailing backslash to name for folders

Post by void »

Thank you for your feedback horst.epp,

Everything 1.5.0.1281a will now only append the path separator to the name column when using the folder_append_path_separator ini setting.


Use efu_folder_append_path_separator to append a trailing path separator when exporting EFU files.
horst.epp
Posts: 1443
Joined: Fri Apr 04, 2014 3:24 pm

Re: Add trailing backslash to name for folders

Post by horst.epp »

Thanks for updating.
With 1281a the results of our script in Total Commander are now consistent
and independend of the folder_append_path_separator option.
There are no more any \\ and our script adds a trailing backslash to folder entries.
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Add trailing backslash to name for folders

Post by tuska »

Hi,

I have noticed that in Everything 1.5.0.1281a (x64) with
folder_append_path_separator=0
-OR-
folder_append_path_separator=1
and CTRL+SHIFT+C, CTRL+V I no longer get a backslash at the end of the last folder name.
Example:
D:\Daten\WINWORD\AddIn

In Everything 1.5.0.1280a (x64) I still get the backslash at the end.
Backslash in 1.5.0.1280a always works, no matter if folder_append_path_separator=1 or folder_append_path_separator=0.
Example:
D:\Daten\WINWORD\AddIn\

Therefore, please check.
Thank you!
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Add trailing backslash to name for folders

Post by raccoon »

I actually kind of like the visual aesthetic of this feature. No particular need for it otherwise.
Think I'm going to leave /folder_append_path_separator=1 turned on for a while to break it in.
void
Developer
Posts: 16681
Joined: Fri Oct 16, 2009 11:31 pm

Re: Add trailing backslash to name for folders

Post by void »

Thank you for the feedback,

I will add more xxx_folder_append_path_separator settings for full control.

eg:
copy_folder_append_path_separator

Some users will want the \ as appearance only, and others will want copy full path and filename to include the trailing slash.

folder_append_path_separator will be for display only going forward.


txt_folder_append_path_separator for exporting as txt is in development and will probably be enabled by default.
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Add trailing backslash to name for folders

Post by tuska »

void wrote: Fri Oct 22, 2021 2:48 am ...
I will add more xxx_folder_append_path_separator settings for full control.

eg:
copy_folder_append_path_separator

Some users will want the \ as appearance only,
and others will want copy full path and filename to include the trailing slash.

folder_append_path_separator will be for display only going forward.
Thanks in advance!

folder_append_path_separator
copy_folder_append_path_separator

It could then e.g. look like this:

Code: Select all

========================================================================================================================================================
TC		Everything	   Folder   Status bar				CTRL+SHIFT+C - Addin	 Set parameters
Everything	Search box	   EV	    Everything				CTRL+V, e.g.   Addin\    /copy... ENTER, look at the status bar
========================================================================================================================================================
Total Commander ...................................... [88 files, 10 folders]
EV-1.5.0.128xa  D:\Daten\WINWORD\  AddIn    98 objects (88 files, 10 folders)	D:\Daten\WINWORD\AddIn   /folder_append_path_separator=0       (default)
										D:\Daten\WINWORD\AddIn   /copy_folder_append_path_separator=0  (default)
										D:\Daten\WINWORD\AddIn\  /copy_folder_append_path_separator=1
========================================================================================================================================================
Total Commander ...................................... [88 files, 10 folders]
EV-1.5.0.128xa  D:\Daten\WINWORD   AddIn    99 objects (88 files, 11 folders)	D:\Daten\WINWORD\AddIn   /folder_append_path_separator=0       (default)
********* Folder "WINWORD" appears in the "Name" field and is ADDED! ********	D:\Daten\WINWORD\AddIn   /copy_folder_append_path_separator=0  (default)
********* 11 folders, 99 objects, instead of 10 folders, 98 objects! ********	D:\Daten\WINWORD\AddIn\  /copy_folder_append_path_separator=1
********************************************************************************************************************************************************
Total Commander ...................................... [88 files, 10 folders]
EV-1.5.0.128xa  D:\Daten\WINWORD\  AddIn\   98 objects (88 files, 10 folders)   D:\Daten\WINWORD\AddIn   /folder_append_path_separator=1
										D:\Daten\WINWORD\AddIn   /copy_folder_append_path_separator=0
										D:\Daten\WINWORD\AddIn\  /copy_folder_append_path_separator=1
========================================================================================================================================================
Total Commander ...................................... [88 files, 10 folders]
EV-1.5.0.128xa  D:\Daten\WINWORD   AddIn\   99 objects (88 files, 11 folders)   D:\Daten\WINWORD\AddIn\	 /folder_append_path_separator=1
********* Folder "WINWORD" appears in the "Name" field and is ADDED! ********   D:\Daten\WINWORD\AddIn   /copy_folder_append_path_separator=0
********* 11 folders, 99 objects, instead of 10 folders, 98 objects! ********	D:\Daten\WINWORD\AddIn\  /copy_folder_append_path_separator=1
========================================================================================================================================================

=====================================================================================
My settings currently in use:
-------------------------------------------------------------------------------------
folder_append_path_separator=1
hdrop_folder_append_path_separator=1
efu_folder_append_path_separator=1
-------------------------------------------------------------------------------------
copy_folder_append_path_separator=1    -> Not yet possible in Everything 1.5.0.1281a.
=====================================================================================
void
Developer
Posts: 16681
Joined: Fri Oct 16, 2009 11:31 pm

Re: Add trailing backslash to name for folders

Post by void »

Everything 1.5.0.1282a adds a copy_folder_append_path_separator and a txt_folder_append_path_separator ini setting.


To copy folders to the clipboard with a trailing backslash:
  • In Everything, type in the following search and press ENTER:
    /copy_folder_append_path_separator=1
  • If successful, copy_folder_append_path_separator=1 is shown in the status bar for a few seconds.
To export folders to a TXT file with a trailing backslash:
  • In Everything, type in the following search and press ENTER:
    /txt_folder_append_path_separator=1
  • If successful, txt_folder_append_path_separator=1 is shown in the status bar for a few seconds.
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Add trailing backslash to name for folders

Post by tuska »

2void
Thank you for the implementation!

Code: Select all

copy_folder_append_path_separator=1
CTRL+Shift+C brings back the trailing backslash for folders.

Code: Select all

txt_folder_append_path_separator=1
With this new option, the difference is not yet clear to me,
because I get the same result with or without option 1 in the format shown below.

txt_folder_append_path_separator=0

Code: Select all

Test1.txt

Filename,			 Size,   Date Modified,     Date Created,      Attributes
"D:\Testfolder\Folder1\Folder2\",1392329,132424918794393705,132424638692801709,16
"D:\Testfolder\Folder1\Folder3\",      0,132468144702296383,132424902630249424,16
txt_folder_append_path_separator=1

Code: Select all

Test2.txt

Filename,			 Size,   Date Modified,     Date Created,      Attributes
"D:\Testfolder\Folder1\Folder2\",1392329,132424918794393705,132424638692801709,16
"D:\Testfolder\Folder1\Folder3\",      0,132468144702296383,132424902630249424,16
void
Developer
Posts: 16681
Joined: Fri Oct 16, 2009 11:31 pm

Re: Add trailing backslash to name for folders

Post by void »

It looks like Save as type is still set to EFU Everything File List (*.efu)?

Please try exporting with the Save as type set to Text Files (*.txt):
  • In Everything, from the File menu, click Export....
  • Change Save as type to Text Files (*.txt).
  • Choose a filename and click Save.
I've put on my TODO list to add support for txt_folder_append_path_separator to Save as type - Text (Tab delimited)
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Add trailing backslash to name for folders

Post by tuska »

2void
Thank you, I completely overlooked that :oops:

That's the way to do it:
Save as 'File type: Text Files (*.txt)'

txt_folder_append_path_separator=0
D:\Testfolder\Folder1\Folder2
D:\Testfolder\Folder1\Folder3

txt_folder_append_path_separator=1
D:\Testfolder\Folder1\Folder2\
D:\Testfolder\Folder1\Folder3\
void
Developer
Posts: 16681
Joined: Fri Oct 16, 2009 11:31 pm

Re: Add trailing backslash to name for folders

Post by void »

Everything 1.5.0.1283a adds the csv_folder_append_path_separator ini setting.

txt_folder_append_path_separator will now also apply to exporting as TEXT (Tab delimited)

Exporting as CSV will now save the Filename column instead of the Name and Path columns.


efu_folder_append_path_separator, txt_folder_append_path_separator and csv_folder_append_path_separator ini settings will now apply when exporting from the File List Editor.
void
Developer
Posts: 16681
Joined: Fri Oct 16, 2009 11:31 pm

Re: Add trailing backslash to name for folders

Post by void »

Everything 1.5.0.1302a removes copy_folder_append_path_separator.

The setting already exists as copy_path_folder_append_backslash.

I am considering renaming copy_path_folder_append_backslash to copy_folder_append_path_separator so this is more inline with the new append_path_separator settings.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Add trailing backslash to name for folders

Post by NotNull »

Hasn't this been fixed in Total Commander yet?
(meaning that this workaround is no longer needed)
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Add trailing backslash to name for folders

Post by tuska »

NotNull wrote: Thu Feb 24, 2022 8:37 pm Hasn't this been fixed in Total Commander yet?
(meaning that this workaround is no longer needed)
If you mean the AHK script, then there is no problem with the trailing backslash for me.

I use now the parameter

Code: Select all

copy_path_folder_append_backslash=1
because I often just copy the path from folder(s) in Everything with Ctrl+Shift+C for documentation purposes.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Add trailing backslash to name for folders

Post by NotNull »

tuska wrote: Thu Feb 24, 2022 9:49 pm If you mean the AHK script, then there is no problem with the trailing backslash for me.
Yes, that thread indeed. Where TC produces different input (or was it output?) depending on the number of files/folders that are processed...


But you use it in other ways too, so the option is still needed anyway.
void
Developer
Posts: 16681
Joined: Fri Oct 16, 2009 11:31 pm

Re: Add trailing backslash to name for folders

Post by void »

Everything 1.5.0.1310a will now append a trailing backslash to folders by default when exporting.
Post Reply