"Sibling" in Plugin Misc - Problems to understand

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Peter
Power Member
Power Member
Posts: 2068
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz

"Sibling" in Plugin Misc - Problems to understand

Post by *Peter »

After a long break I tried again to understand "Sibling" - and failed.

What I have:
- I have 1.dwg, 2.dwg, 3.dwg, ..., 100.dwg
- I have 2.adt, 3.adt, 99.adt
- and some other stuff ..

What I want:
- Test if every DWG has a sibling with extension ADT.
- 2.dwg, 3.dwg and 99.dwg should display "YES", all other DWG should display "no"

What I did:
- In misc.ini I set "extension= dwg" (and later I changed it to "extension=adt")
- I defined a user-defined column.

What I get (with both ini):

Code: Select all

1.dwg   No
1.adt    yes
1.txt     yes
Can someone explain what happened why and how to reach my target?

Peter
TC 10.xx / #266191
Win 10 x64
User avatar
Vochomurka
Power Member
Power Member
Posts: 816
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka »

I have the following setting in my misc.ini:

Code: Select all

[Sibling]
Extension=txt
I copied and renamed some files, and used custom columns. Result is:

Code: Select all

1.doc		Yes
1.dwg		Yes
1.txt		No
2.txt		No
So, word "Yes" or "No" seems to be answer: "Is there a sibling of THIS file with the DEFINED extension?".
Single user license #329241
PowerPro scripts for Total Commander
User avatar
Peter
Power Member
Power Member
Posts: 2068
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz

Post by *Peter »

Vochomurka wrote:So, word "Yes" or "No" seems to be answer: "Is there a sibling of THIS file with the DEFINED extension?".
Yes, this was also exactly my idea. But the problem is described above: I toggled the settings between ADT and DWG and waited that YES and NO are changing for 1.dwg and 1.adt. But it was always the same ...

Peter
TC 10.xx / #266191
Win 10 x64
User avatar
nsp
Power Member
Power Member
Posts: 1917
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: "Sibling" in Plugin Misc - Problems to underst

Post by *nsp »

Peter wrote:After a long break I tried again to understand "Sibling" - and failed.
...
Can someone explain what happened why and how to reach my target?

Peter
If your goal is to detect which file do not have their corresponding "sibling" XX.dwg must have XX.adt sibling as it is now can not reach your goal. The sibling for extension YYY means does any FileName.??? have another file corresponding fileName.YYY...

If you want to have a wdx plugin, you can use Script Content plugin to make your own interpreted column.

If you want a quick way to detect missing files, you can use TCBL with a script like :

Code: Select all

[SiblingDWG]
pre=@echo off
cmd=<dwg>if not exist "$x.adt" echo "$n.adt" Missing
you can define the TC button as :

Code: Select all

command=<path to>\tcbl.exe
parameters= -ipq %L SiblingDWG
You select all your dwg file and you will see the resulting list ! But not in a column :(
User avatar
Peter
Power Member
Power Member
Posts: 2068
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz

Re: "Sibling" in Plugin Misc - Problems to underst

Post by *Peter »

nsp wrote:... The sibling for extension YYY means does any FileName.??? have another file corresponding fileName.YYY...
OK, the fog is lifting ... in other words:
"Search for my defined group if there is a brother outside. Defined group is always NO, brothers are YES." (of course sisters too..)

Maybe I had a refreshing problem: At first tests the changing of settings had no results, but now it seems to work. Tomorrow I will test another machine.

Thanks
Peter
TC 10.xx / #266191
Win 10 x64
Post Reply