Branch view, Keep relative paths: filter to copy dirs only doesn't work

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Branch view, Keep relative paths: filter to copy dirs only doesn't work

Post by *DrShark »

To reproduce:
1. Enter some folder which has subfolders with files inthere.
2. Switch to branch view (Ctrl+B).
3. Select some files which are in mentioned above subfolders.
4. Press F5.
4.1. Check "Keep relative paths (relative to current directory)" option.
4.2. In "Only files of this type", enter a mask which tells TC to copy only folders, e.g. |*.*
5. Start copy process. However, after it will be finished, no folders will appear in target,
though it's expected to see emty subfolders with their relative structure (as it appears for selection in step 3) copied to destination.

Note: with current TC's move behavior, the same results would be expected if we'd use F6 in step 4: currently even without "Keep relative paths (relative to current directory)" with |*.* set as a filter TC just copies empty folder(s) to target, but source folder(s) and their content is not deleted.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Branch view, Keep relative paths: filter to copy dirs only doesn't work

Post by *ghisler(Author) »

This doesn't tell TC to skip files, it only tells it to not enter subfolders when copying.
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Re: Branch view, Keep relative paths: filter to copy dirs only doesn't work

Post by *DrShark »

ghisler(Author) wrote: 2020-08-03, 15:24 UTCThis doesn't tell TC to skip files, it only tells it to not enter subfolders when copying.
Maybe I don't understand what this explanation means, but why then if to Copy NOT from Branch view (and with Keep relative paths checked there), then with the filter |*.* TC copies whole subdirectories tree skipping the files?
I also tried "official" way to copy directories only: I saved a Find Files search with only "Directory" attribute checked, and if to use this saved search as a filter in Copy/Move dialog, it works exactly the same way as |*.* ...
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: Branch view, Keep relative paths: filter to copy dirs only doesn't work

Post by *MVV »

Perhaps that's because copying from branch view only creates target folders when necessary while regular copying always creates them, so you can use filters like |*.* or, much easier to remember, any nonsense like @#$%@#$#@. :)
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Re: Branch view, Keep relative paths: filter to copy dirs only doesn't work

Post by *DrShark »

I admit that help says:
TC Help, F5: Copy page wrote:Keep relative paths "This allows you to copy files with the full path relative to the current directory. This way the directory structure can be preserved.
which means it's designed to copy only files (though in theory a directory is a file too...). But since it's called "Keep relative paths", I think it's expected to include both files and directories in such copy, so it'd be possible to use the filter to copy only relative dir trees for selecrted files.

Maybe it's better to move this topic to suggestions subforum (I'll edit start post from bug to suggestion)? Or to Behavior will not be changed (for now, then I'll add a separate suggestion topic.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Re: Branch view, Keep relative paths: filter to copy dirs only doesn't work

Post by *DrShark »

Are there plans to make directories only tree creation when files are copied from branch view with "Keep relative paths (relative to current directory)" option? Maybe not by setting a filter mask like |*.* as mentioned in the report, but with some additional option?

And regarding |*.* filter in normal copy (no branch view as source), you described its work as:
ghisler(Author) wrote: 2020-08-03, 15:24 UTC This doesn't tell TC to skip files, it only tells it to not enter subfolders when copying.
It's not clear here what exactly "not enter subfolders when copying" does mean? How copy function enters subfolders when |*.* isn't set and how it doen't when this filter is used?
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Post Reply