executor.wcx

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
Lev
Junior Member
Junior Member
Posts: 82
Joined: 2004-12-14, 13:08 UTC

executor.wcx

Post by *Lev »

executor.wcx (c)2008, Lev Freidin

executor.wcx is the UnPacker plugin which allows to execute definite commands depending on file extension. See the examples of usage in ini file.
You can use it with different comandline file converters. It can be useful for "unpacking" several files at once, for the text search inside the archive, where text searched is a result of some conversion (NOTE. the executor.wcx must be registered as a default unpacker for files with desired extension to be able to use the search inside archives function).
The nearest competition plugins are TCConv (Total Converter), MultiArc, MultiLister (former PDF Filter), TextSearch
User avatar
byblo
Senior Member
Senior Member
Posts: 270
Joined: 2005-02-20, 21:13 UTC
Contact:

Post by *byblo »

Nice plugin, looks like the CTconv.

But there is a little problem: the command do not seems supporting more than 256 characters.

Also, is it possible to add some env paths like the %commander_path% or %programfiles%, ect ?
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

Damn, I was going to release a different plugin with this name. :D
User avatar
Lev
Junior Member
Junior Member
Posts: 82
Joined: 2004-12-14, 13:08 UTC

Post by *Lev »

is it possible to add some env paths like the %commander_path%...
Could you post an example of a non-working command using environment variable?
User avatar
byblo
Senior Member
Senior Member
Posts: 270
Joined: 2005-02-20, 21:13 UTC
Contact:

Post by *byblo »

Lev wrote:
is it possible to add some env paths like the %commander_path%...
Could you post an example of a non-working command using environment variable?
Create a batch file, for instance called test.bat :

Code: Select all

@echo off
echo %1
echo %2
echo %3
pause
exit
executor.ini :

Code: Select all

[txt]
fileout1="[N].test!.txt"
command1=c:\test.bat "filein" "fileout" %systemdrive%
log=1
ShowConsole=1
That one seems working correctly, but now change the c: to %systemdrive% :

executor.ini :
[txt]
fileout1="[N].test!.txt"
command1=%systemdrive%\test.bat "filein" "fileout" %systemdrive%
log=1
ShowConsole=1

This time nothing happens.


Also, what about the 256 characters limit ? Are you planning to fix it ?
User avatar
Lev
Junior Member
Junior Member
Posts: 82
Joined: 2004-12-14, 13:08 UTC

Post by *Lev »

try executor.wcx 0.0.0.5

[*] Tryed to fix support for %Environment_variables%
[+] 256 characters command length limit encreased to 1024
User avatar
byblo
Senior Member
Senior Member
Posts: 270
Joined: 2005-02-20, 21:13 UTC
Contact:

Post by *byblo »

Thank you.

The env variables seems now working well but since the executor didn't allow the "" for the application line, it is impossible to use some, like the %programfiles% one, since it generally containing a space char.

Also, the length limit to 1024 still giving problems when using some very deep paths.
User avatar
Lev
Junior Member
Junior Member
Posts: 82
Joined: 2004-12-14, 13:08 UTC

Post by *Lev »

Enframe the whole path construction with quotes like "%programfiles%\SomeDir\SomeSubDir\..."
Check the executing command in the log file.

What length limit will do?
User avatar
byblo
Senior Member
Senior Member
Posts: 270
Joined: 2005-02-20, 21:13 UTC
Contact:

Post by *byblo »

If you use the quotes, this is what happens :

ini :

Code: Select all

command1="%programfiles%\test.cmd" "filein" "fileout"
log :
(notice that the first quote and the very last have disappeared from the entire line)

Code: Select all

command1 = C:\Program Files\test.cmd" "T:\wincmd\wcx\executor\read_me.txt" "C:\read_me.test!.txt
About the length limit, i dont know. What about something very deep, like 4096 or even 8192 ?
User avatar
dott
Senior Member
Senior Member
Posts: 285
Joined: 2007-03-04, 00:58 UTC
Location: La Plata, Argentina

Post by *dott »

I believe that 8192 is the limit for cmd.exe, in most cases should be enough.
User avatar
Lev
Junior Member
Junior Member
Posts: 82
Joined: 2004-12-14, 13:08 UTC

Post by *Lev »

Unfortunately GetPrivateProfileString command trims string enframing quotes while reading ini key value. You have to double enframing quotes to make it work right

Code: Select all

command1=""%programfiles%\test.cmd" "filein" "fileout""

or wait untill I write my own ini reading function
Hurdet
Power Member
Power Member
Posts: 710
Joined: 2003-05-10, 18:02 UTC

Post by *Hurdet »

It not work for me.
if add
C:\ProgramFiles\TotalCmd\plugins\WCX\Executor\
to start of command

If i search inside the archive TC loop and not stop search.
Post Reply