Keep relative paths (relative to current directory) in listbox of find files

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
monarch-lfv
Junior Member
Junior Member
Posts: 73
Joined: 2022-06-16, 23:37 UTC

Keep relative paths (relative to current directory) in listbox of find files

Post by *monarch-lfv »

When copying files from the Branch View, there is an checkbox in the dialog box (because there is a path in the address bar):

Code: Select all

Keep relative paths (relative to current directory)
When searching in a specific directory, you can list the found files and folders, but when copying from search results, there is no such checkbox (because the address bar is empty). Is it possible to add the same checkbox?
Fla$her
Power Member
Power Member
Posts: 2388
Joined: 2020-01-18, 04:03 UTC

Re: Keep relative paths (relative to current directory) in listbox of find files

Post by *Fla$her »

In this case, TC must first check that the search is not conducted on several drives and there is no "ev:" at the beginning of the search string.
That is, such information must be stored in memory to check the last search query.
Overquoting is evil! 👎
monarch-lfv
Junior Member
Junior Member
Posts: 73
Joined: 2022-06-16, 23:37 UTC

Re: Keep relative paths (relative to current directory) in listbox of find files

Post by *monarch-lfv »

Personally, I've never searched on the entire drive (or multiple drives). Usually, the search is started from one specific directory - it can be considered the initial one, and paths can be saved relative to it.
When searching on several disks, I suggest adding the initial folder with the drive letter when copying with this checkbox.
Fla$her
Power Member
Power Member
Posts: 2388
Joined: 2020-01-18, 04:03 UTC

Re: Keep relative paths (relative to current directory) in listbox of find files

Post by *Fla$her »

It will not work, since the search can be conducted in several folders of both one and several disks.
Overquoting is evil! 👎
monarch-lfv
Junior Member
Junior Member
Posts: 73
Joined: 2022-06-16, 23:37 UTC

Re: Keep relative paths (relative to current directory) in listbox of find files

Post by *monarch-lfv »

What is the problem with keeping the highest identical path in this case? I don't see a problem.
What is the fundamental difference from branch view? Give an example why it is not possible?
Fla$her
Power Member
Power Member
Posts: 2388
Joined: 2020-01-18, 04:03 UTC

Re: Keep relative paths (relative to current directory) in listbox of find files

Post by *Fla$her »

TC searches for name.ext in the following folders: C:\Test; C:\Test2\Test3; D:\Test; D:\Test2.
The following appears in the search results:

Code: Select all

C:\Test\name.ext
C:\Test\1\name.ext
C:\Test\2\name.ext
C:\Test\1\2\name.ext
C:\Test2\Test3\name.ext
C:\Test2\Test3\dir1\name.ext
C:\Test2\Test3\dir1\dir2\name.ext
C:\Test2\Test3\dir2\name.ext
D:\Test\name.ext
D:\Test\blabla\name.ext
D:\Test\bla\bla\name.ext
D:\Test\bla\bla\bla\name.ext
D:\Test2\blabla\name.ext
How do you propose to keep relative paths here if the cropping of the left side should be common to everyone?
Last edited by Fla$her on 2023-06-21, 12:31 UTC, edited 1 time in total.
Overquoting is evil! 👎
monarch-lfv
Junior Member
Junior Member
Posts: 73
Joined: 2022-06-16, 23:37 UTC

Re: Keep relative paths (relative to current directory) in listbox of find files

Post by *monarch-lfv »

For your example:

Code: Select all

..\C\Test\name.ext
..\C\Test\1\name.ext
..\C\Test\2\name.ext
..\C\Test\1\2\name.ext
..\C\Test2\Test3\name.ext
..\C\Test2\Test3\dir1\name.ext
..\C\Test2\Test3\dir1\dir2\name.ext
..\C\Test2\Test3\dir2\name.ext
..\D\Test\name.ext
..\D\Test\blabla\name.ext
..\D\Test\bla\bla\name.ext
..\D\Test\bla\bla\name.ext
..\D\Test\bla\bla\bla\name.ext
..\D\Test2\blabla\name.ext
But your example, I have never used in my life.

I usually start the search from one specific folder, for example: "C:\Test\"
result:

Code: Select all

C:\Test\1\name.ext
C:\Test\2\name.ext
C:\Test\1\2\name.ext
then copying with a checkbox will be like this:

Code: Select all

..\1\name.ext
..\2\name.ext
..\1\2\name.ext
Fla$her
Power Member
Power Member
Posts: 2388
Joined: 2020-01-18, 04:03 UTC

Re: Keep relative paths (relative to current directory) in listbox of find files

Post by *Fla$her »

monarch-lfv wrote: 2023-06-21, 12:30 UTCFor your example:
And what is the practical point of this?
monarch-lfv wrote: 2023-06-21, 12:30 UTCBut your example, I have never used in my life.
You must understand that the author will not adapt to your needs, but will take into account the full functionality of the program.

As I said, it is necessary to take into account the preliminary settings, because the author will not want to process the entire list displayed on the panel, because this can greatly slow down the start.
Overquoting is evil! 👎
monarch-lfv
Junior Member
Junior Member
Posts: 73
Joined: 2022-06-16, 23:37 UTC

Re: Keep relative paths (relative to current directory) in listbox of find files

Post by *monarch-lfv »

For your example - no use. But even in this case, later you can merge the contents of the folders "C\" and "D\".
Another example, let's say I'm looking with content specific TXT files in a hundred folders with a complex structure. I display the search results on the panel and I want to copy them while maintaining the structure. How would you do it in this case?
In any case, it is not the search process itself that will have to be processed, but its results, which always have the structure Disk:\path\file.
Exactly the same as with branch view.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6532
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Keep relative paths (relative to current directory) in listbox of find files

Post by *Horst.Epp »

As fla$her already said, TC is not designed for your special needs.
I often use searches which include results from many paths
not to forget global searches driven from Everything results.
I never needed the logic you suggest.
Let's wait what Christian thinks about it.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3737)
TC 11.03 x64 / x86
Everything 1.5.0.1382a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
Fla$her
Power Member
Power Member
Posts: 2388
Joined: 2020-01-18, 04:03 UTC

Re: Keep relative paths (relative to current directory) in listbox of find files

Post by *Fla$her »

monarch-lfv wrote: 2023-06-21, 12:43 UTC In any case, it is not the search process itself that will have to be processed, but its results, which always have the structure Disk:\path\file.
Christian really does not like this kind of retarders, so the probability of such a scenario is small.
Overquoting is evil! 👎
monarch-lfv
Junior Member
Junior Member
Posts: 73
Joined: 2022-06-16, 23:37 UTC

Re: Keep relative paths (relative to current directory) in listbox of find files

Post by *monarch-lfv »

I don't think these are my special needs. The example given is quite simple. Moreover, this functionality is already present in branch view.
Everything does not cover this need. It basically searches by filename. It is more difficult when the search is performed by content, especially not just text files, but for example PDF, docx, mp3, etc.
We are waiting for the author TC ))
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Keep relative paths (relative to current directory) in listbox of find files

Post by *ghisler(Author) »

There is a plugin for that called TreeCopyPlus:
https://totalcmd.net/plugring/TreeCopyPlus.html
It is used like a packer (Alt+F5) but instead copies files.
Author of Total Commander
https://www.ghisler.com
monarch-lfv
Junior Member
Junior Member
Posts: 73
Joined: 2022-06-16, 23:37 UTC

Re: Keep relative paths (relative to current directory) in listbox of find files

Post by *monarch-lfv »

2ghisler(Author)
I known about this Plugin. There is also another plugin - CopyTree.wcx (more recent). Thought it might be possible to add built-in functionality.
A checkbox in the copy dialog would be much more convenient.
Moreover, if there is an implementation by a plugin, then there is both logic and a need for this.
Maybe add a parameter to the cm_PackFiles command to include a plugin (in this case named CopyTree) for button on bar?
JOUBE
Power Member
Power Member
Posts: 1507
Joined: 2004-07-08, 08:58 UTC

Re: Keep relative paths (relative to current directory) in listbox of find files

Post by *JOUBE »

monarch-lfv wrote: 2023-06-22, 09:34 UTC I known about this Plugin. There is also another plugin - CopyTree.wcx (more recent). Thought it might be possible to add built-in functionality.
I know both plugins and use them too, albeit reluctantly. And I always have a bad feeling when I have to trust the programming skills of an external tool in terms of security and reliability for this basic function of a file manager. And unfortunately I have to, because the TC offers these - as I already wrote - basic - function unfortunately not.

Most of the time I use the following workaround in important cases (and I do this so that I stay within the Tc routines):
- Search with Alt+F7 with the corresponding file mask in the selected path
- [Feed to listbox] of the found files
- Compress with Alt+F5 (zip) with relative paths
- Extract the pack.zip to the new location.

And it can't really be that, can it?

That's why I support it very much

+1

Joube
Post Reply