Selecting related files

English support forum

Moderators: sheep, Hacker, Stefan2, white

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

Selecting related files

Post by *Hacker » 2019-06-29, 13:16 UTC

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: 774
Joined: 2003-06-05, 10:45 UTC

Re: Selecting related files

Post by *Wilhelm M. » 2019-06-29, 17:02 UTC

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
Senior Member
Senior Member
Posts: 476
Joined: 2011-03-11, 10:11 UTC

Re: Selecting related files

Post by *Usher » 2019-06-29, 20:18 UTC

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
Regards from Poland
Andrzej P. Wozniak

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

Re: Selecting related files

Post by *Hacker » 2019-06-29, 20:38 UTC

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
Senior Member
Senior Member
Posts: 476
Joined: 2011-03-11, 10:11 UTC

Re: Selecting related files

Post by *Usher » 2019-06-29, 21:13 UTC

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.).
Regards from Poland
Andrzej P. Wozniak

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

Re: Selecting related files

Post by *Hacker » 2019-06-29, 21:50 UTC

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
Senior Member
Senior Member
Posts: 476
Joined: 2011-03-11, 10:11 UTC

Re: Selecting related files

Post by *Usher » 2019-06-30, 12:20 UTC

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…
Regards from Poland
Andrzej P. Wozniak

User avatar
petermad
Power Member
Power Member
Posts: 8547
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Selecting related files

Post by *petermad » 2019-06-30, 12:31 UTC

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 9.5b1 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1903) 64bit, 'Everything' 1.4.1.935 (x64)
TC 3.0b12 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

User avatar
Wilhelm M.
Power Member
Power Member
Posts: 774
Joined: 2003-06-05, 10:45 UTC

Re: Selecting related files

Post by *Wilhelm M. » 2019-06-30, 13:16 UTC

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: 11278
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Selecting related files

Post by *Hacker » 2019-06-30, 20:33 UTC

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: 8547
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Selecting related files

Post by *petermad » 2019-07-01, 01:52 UTC

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 9.5b1 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1903) 64bit, 'Everything' 1.4.1.935 (x64)
TC 3.0b12 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

marlar
Junior Member
Junior Member
Posts: 39
Joined: 2010-03-08, 11:18 UTC

Re: Selecting related files

Post by *marlar » 2019-09-02, 10:30 UTC

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: 17
Joined: 2012-07-29, 18:12 UTC
Location: Russia
Contact:

Re: Selecting related files

Post by *LogicDaemon » 2019-09-02, 14:38 UTC

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: 39
Joined: 2010-03-08, 11:18 UTC

Re: Selecting related files

Post by *marlar » 2019-09-03, 06:24 UTC

Also it does not work in flat view, see viewtopic.php?f=14&t=27606&p=358898#p358890

Post Reply