Selecting related files

English support forum

Moderators: white, Hacker, petermad, Stefan2

User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Selecting related files

Post by *Hacker »

Hi all,
TC Help wrote:You can now select related files. For example, you would want to select all RAW image files (.cr2), but only if there is a jpg file in the same directory. This can be done with the following selection string:
*.jpg>*.cr2
So, if I understand correctly, this should select all .cr2 files for which there is a .jpg.
I have a dir with:
a.cr2
a.jpg
b.cr2
c.jpg

I press Num+, type:

Code: Select all

*.jpg>*.cr2
press Enter.

Expected result: selects all .cr2 images for which there are related .jpg files:
a.cr2

Actual result: selects all .cr2 images for which there are related .jpg files and additionally selects all .jpg files:
a.cr2
a.jpg
c.jpg


Either the help file text should be adjusted or the functionality.
(I understand I can perform a Num-, *.jpg, Enter afterwards to get my desired result.)

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Wilhelm M.
Power Member
Power Member
Posts: 990
Joined: 2003-06-05, 10:45 UTC

Re: Selecting related files

Post by *Wilhelm M. »

Confirmed!
And if one writes *cr2>*jpg then only the corresponding files are selected, but, again, both are selected, not only the desired one. I don't think this is what was intended.
Grüße/Regards,
Wilhelm
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Selecting related files

Post by *Usher »

It's misunderstanding. Related files are groups of files with the same name and different extensions. In your case raw files *.cr2 are parents and *.jpg files (created from raw files) are their children. You can select families with more children at once, for example *.dbf files with related *.cdx and *.fpt files:

Code: Select all

*.dbf>*.cdx *.fpt
Andrzej P. Wozniak
Polish subforum moderator
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Selecting related files

Post by *Hacker »

Usher,
As I said, if that is how it's supposed to work then the Help file text quoted above should be adjusted.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Selecting related files

Post by *Usher »

Well, the example from TC help is reversed - it shows how to select children *.jpg > and their parents *.cr2 (if exist). Unrelated *.cr2 and other files stay unselected.
Of course, you are right - the description is unclear. IMHO it will be easy understood only when using terms for family relations (parent, child, family, orphan, etc.).
Andrzej P. Wozniak
Polish subforum moderator
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Selecting related files

Post by *Hacker »

Usher,
I'd suggest using a short example since the files do not really have to be in any relationship to each other apart from sharing a part of their name.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Selecting related files

Post by *Usher »

There should be both - feature description and some examples - with explanation which file will be selected in any case. Examples should show only INTENDED use (as seen above - parent raw and children jpeg files), showing other uses isn't helpful.
However, if you use terms for family relations, other users will be aware that there are many directly unrelated people with the same family name - and they will easy understand how to extend intended use…
Andrzej P. Wozniak
Polish subforum moderator
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Selecting related files

Post by *petermad »

2Hacker
I agree that the Help is deceiving. It should also be mentioned that en entry like: *.jpg>*.cr2 *.raw will select both .cr2 and .raw files when a .jpg file with the same name exists
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Wilhelm M.
Power Member
Power Member
Posts: 990
Joined: 2003-06-05, 10:45 UTC

Re: Selecting related files

Post by *Wilhelm M. »

As Hacker pointed out, there are TWO possibilities, either changing the description or changing the functionality. I personly think that a function to select files that have related files would be very useful. The example of the picture files shows this very clearly. If e.g. you want to delete the raw files that have already been converted to another format, you execute the command and then simply delete the selected files. As it presently is, you must execute another command, before you can delete the unwanted files.
Grüße/Regards,
Wilhelm
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Selecting related files

Post by *Hacker »

petermad,
en entry like: *.jpg>*.cr2 *.raw will select both .cr2 and .raw files when a .jpg file with the same name exists
Actually, it will also select all .jpg files.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Selecting related files

Post by *petermad »

Actually, it will also select all .jpg files.
Sure, just like *.jpg>*.cr2 does it - I just wanted to point out that you can actually select more than one related file type, but the help does not inform about that.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
marlar
Junior Member
Junior Member
Posts: 40
Joined: 2010-03-08, 11:18 UTC

Re: Selecting related files

Post by *marlar »

Neat feature! Would be nice if could be inversed, like selecting all CR2 files that have NOT a JPG parent.

And yes, I can accomplish it by negating the selection afterwards and then deselect JPG files, but I think of something like using the vertikal bar when searching.
LogicDaemon
Junior Member
Junior Member
Posts: 20
Joined: 2012-07-29, 18:12 UTC
Location: Russia
Contact:

Re: Selecting related files

Post by *LogicDaemon »

and even cooler it would be, if it can be done between panels: only select jpgs on the left if there's cr2 with same name on the right. Like advanced Shift+F2.

I actually ended up writing autohotkey script for that a while ago (still in use).
marlar
Junior Member
Junior Member
Posts: 40
Joined: 2010-03-08, 11:18 UTC

Re: Selecting related files

Post by *marlar »

User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Selecting related files

Post by *Hacker »

Christian,
Could we please have this fixed? Either the functionality or the description in Help?

TIA
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Post Reply