WDXcontains content plugin.

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

Moderators: Hacker, petermad, Stefan2, white

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

Post by *DrShark »

fenix_productions, thanks again, you saved much time for me :)
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
Iveco
Junior Member
Junior Member
Posts: 14
Joined: 2009-05-31, 13:19 UTC

Post by *Iveco »

Thank you for this plugin.

I need help, I have the following problem:

I do want to mark all directory which have a *.txt file included (I know how to setup it in TC (colors) but I am unsure about the plugin settings).

I do not exactly know how to use the wildcards in the .INI - my solutions do not seem to work.

Code: Select all

[Options]
FileName=*.txt
LineNumber=
UseRegEx=false
Expression=
ParseFileNames=false
ParseWithDirs=false
IncludeHidden=true
FileNamesExpression=
I also tried:

Code: Select all

[Options]
FileName=
LineNumber=
UseRegEx=false
Expression=
ParseFileNames=false
ParseWithDirs=false
IncludeHidden=true
FileNamesExpression=(?i)((.*.txt)|(*[.]txt))(?i)

- It only needs to find any *.txt file in a directory to trigger. Without any looking into the file etc.

+

Is there are way to force it to a particular directory only? Say it will only work on C:\Temp\ - for perfomance reasons?

Thank you very much great.

GREAT WORK on TC and Plugins!!!
Last edited by Iveco on 2009-05-31, 15:45 UTC, edited 1 time in total.
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

In theory this should work:

Code: Select all

ParseFileNames=true
FileNamesExpression=(?i)(.*[.]txt)(?i)
If it's not working, please, inform me about it. It seems that I will have to rewrite this plugin because I can't load its sources in Borland Builder any more :(

BTW To force it to your path only, you should check Plugins tab and choose tc->path->Contains->C:\Temp\ in "Define selection" window.
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
Iveco
Junior Member
Junior Member
Posts: 14
Joined: 2009-05-31, 13:19 UTC

Post by *Iveco »

My ini is now:

Code: Select all

[Options]
FileName=*  // also tried FileName=
LineNumber=
UseRegEx=false
Expression=
ParseFileNames=true
ParseWithDirs=false
IncludeHidden=false
FileNamesExpression=(?i)(.*[.]txt)(?i) 
My TC setup:

Define colors by file types:

Plugin: wdxcontains Prop: ContainsFile OP: = Val: true

It is not working :-(.
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

2Iveco

Just quick and smaller version:
http://cid-e12762cbdafb3c47.skydrive.live.com/self.aspx/TC/EmptyWDX.zip

Only one parameter (with wildcards) is supported.

Fields:
- IsEmpty(BOOL) - shows if folder is empty;
- IsEmpty(String) - same as above but gives X,
- Contains(BOOL) - checks if folder contains file which matches Filter parameter (no regexp yet),
- Contains(String) - same as above but gives X.
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
Iveco
Junior Member
Junior Member
Posts: 14
Joined: 2009-05-31, 13:19 UTC

Post by *Iveco »


Dear fenix_productions,


thank you very much!

The addon and TC is now exactly doing what I wanted. Perfect!
I didn't know TC was that powerful and has such a great community and help!

I hope I can return the favour somehow :)

Thought I have one more wish. May the parameter Filter support || or a seperate list? I tried specifying "Filter=*.txt||*.txt2" or seperated them by space or comma. It does not work.

Thank you very very much for all your effort!
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

Iveco wrote:
Dear fenix_productions,


thank you very much!

The addon and TC is now exactly doing what I wanted. Perfect!
I didn't know TC was that powerful and has such a great community and help!

I hope I can return the favour somehow :)

Thought I have one more wish. May the parameter Filter support || or a seperate list? I tried specifying "Filter=*.txt||*.txt2" or seperated them by space or comma. It does not work.

Thank you very very much for all your effort!
You can do it in TC.
Have two separate wdxcontains installations, one for *.txt and the other for *.txt2. Then define a search for wdxcontains1 OR wdxcontains2.

Fenix, I think that another extension would be better: support different configs for different fields.
User avatar
Iveco
Junior Member
Junior Member
Posts: 14
Joined: 2009-05-31, 13:19 UTC

Post by *Iveco »

This worked (had to rename folder + ini + wdx).

It is working perfect!

Thank you very much!!!
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

2Iveco
Single pipe | should work as filter separator now:
http://cid-e12762cbdafb3c47.skydrive.live.com/self.aspx/TC/EmptyWDX%7C_v2.zip
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
Iveco
Junior Member
Junior Member
Posts: 14
Joined: 2009-05-31, 13:19 UTC

Post by *Iveco »

Unbelievable support.

It works!

Thank you very much for version 2.0.
(It's a bit easier to handle one plugin (+color rule) than many more)

Really awesome!!
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

2Iveco
I am glad it helps.
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

I've played with this plugin a little bit and created newer version:
http://cid-e12762cbdafb3c47.skydrive.live.com/self.aspx/TC/EmptyWDX%7C_v3.zip

Ini file has been changed to add multiple fields support. By default two columns are shown IsEmpty(BOOL) and IsEmpty(String) but any user can add up to 20 of their owns.

Parameters (x is the counter):

x_filter - files names filter; names can be separated with pipe symbol; wildcards should work correctly;

x_type - defines field type; 0 (default) means boolean, 1 means string (letter X);

x_Name - name for custom field.

Please, test it :)

If it works properly I will add regexp support and release as newer WDXContains version.
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

Do you put it to totalcmd.net?
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

2Alextp

I will think about it (I'd like to add regexp first).
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
HBB
Senior Member
Senior Member
Posts: 295
Joined: 2008-05-05, 21:31 UTC

Post by *HBB »

What a nice plugin. I discovered it very late. :?

It is very convenient in custom columns :
- to sort folders by user defined indexes
- to show a user defined title for each folder (like comments)

For example, I created a Folder.ini file under directories and wrote the followings in it (differs folder to folder) :
Title of the folder
:
Index=01
:
I organized the wdxcontains.ini file as follows :
[Options]
FileName=Folder.ini
LineNumber=1
UseRegEx=true
Expression=[Index=](\d{2})
The following custom column variables returned succesfully : [=wdxcontains.Line] -> Title of the folder and [=wdxcontains.RegExpResult] -> 01

But I did not succed to get wdxcontains.RegExpResult value when I define : Index=01A Index=A1 Index=A01a ... etc. I am not so familiar to regex definitions. I tried a lot of regex examples that I found after searching internet, but, none of them worked. For example : Expression=[Index=](\w{3}) Expression=[Index=](\.*) ... etc.

Can a friend show me a correct regex definition? I want to use any numbers and alphabetical characters randomly as the value of Index variable.

Thanks and regards

----------------------------------------------------

Especially to fenix_productions : Very very thank you for this helpfull plugin.
I hope you will have time for 64 version of it. Otherwise this means that I missed train :wink:

.
Post Reply