AnyCmd - a lister plugin for command line programs/utilities

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

Moderators: sheep, Hacker, Stefan2, white

Post Reply
Serge1
Junior Member
Junior Member
Posts: 15
Joined: 2013-01-10, 00:26 UTC

AnyCmd - a lister plugin for command line programs/utilities

Post by *Serge1 » 2013-02-04, 13:28 UTC

Hi,

I'd like to announce availability of new lister plugin called "AnyCmd".

The plugin permits redirect standard output and error streams of any program to Total Commander lister view. Due to this, possible usage of the plugin is unlimited.

The full announcement is located at http://www.totalcmd.net/plugring/anycmd.html.

The project Web page and corresponding links, can be found at: http://anycmd.sourceforge.net/.

Please let me know your feedback and improvement suggestions.

Best regards,
Serge
Last edited by Serge1 on 2013-02-04, 17:48 UTC, edited 1 time in total.

User avatar
tbeu
Power Member
Power Member
Posts: 1268
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu » 2013-02-04, 16:04 UTC

I use MultiLister WLX for such tasks. I guess AnyCmd is easier to apply as only text output is considered.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more

iana
Senior Member
Senior Member
Posts: 342
Joined: 2010-07-27, 22:00 UTC

Post by *iana » 2013-02-05, 22:35 UTC

hi Serge1 another nice plugin tanks a lot,
just a thought, include the documentation in a simple txt file or a htm (rtf) file inside the zip, as most users get their plugins from totalcmd.net, maybe some other users will share their settings and external tools for file viewing/editing.

jvh
Member
Member
Posts: 183
Joined: 2007-07-20, 12:28 UTC

Post by *jvh » 2013-02-07, 14:20 UTC

Hi Serge1,

thanks for nice plugin.

It seems that variables %COMMANDER_PATH% and %COMMANDER_DRIVE% in lsplugin.ini aren't supported (e.g. Command="%COMMANDER_PATH%\Tools\Prog\prog.exe" %s).

Can you implement support for these variables? It's useful for portable versions of TC.

sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp » 2013-02-13, 06:39 UTC

Hi Serge, thank you for this plugin. Is it possible to specify multiple command strings? This way doesn't work, unsurprisingly

Code: Select all

DetectString=FIND("version=123")
Command=E:\portable\totalcmd\conv\f1.exe -f E:\portable\totalcmd\conv\f1.lst %s
DetectString=EXT=TXT
Command=sort.exe %s
The first DetectString masks out the second one and, consequently, the second Command string.
I would also like %COMMANDER_PATH% variable support. Thank you again.

Serge1
Junior Member
Junior Member
Posts: 15
Joined: 2013-01-10, 00:26 UTC

Post by *Serge1 » 2013-02-23, 12:32 UTC

jvh wrote:Can you implement support for these variables? It's useful for portable versions of TC.
Hello jvh, sgp,
Your request is fulfilled - version 1.1 of the plugin supports environment variables extraction

Serge1
Junior Member
Junior Member
Posts: 15
Joined: 2013-01-10, 00:26 UTC

Post by *Serge1 » 2013-02-23, 12:40 UTC

sgp wrote:The first DetectString masks out the second one and, consequently, the second Command string.
Hi sgp,

As far as I know, TC permits only single DetectString to Lister plugin association. The plugin is invoked only when its detection string complies. Thus, it is not possible to choose different command lines based on detect string.

Serge1
Junior Member
Junior Member
Posts: 15
Joined: 2013-01-10, 00:26 UTC

Re: AnyCmd - a lister plugin for command line programs/utili

Post by *Serge1 » 2013-02-23, 12:44 UTC

Hi All,

I'd like to announce availability of "AnyCmd" plugin version 1.1.

The full announcement is located at http://www.totalcmd.net/plugring/anycmd.html.

The project Web page and corresponding links, can be found at: http://anycmd.sourceforge.net/.

Please let me know your feedback and improvement suggestions.

Best regards,
Serge

User avatar
LonerD
Senior Member
Senior Member
Posts: 303
Joined: 2010-06-19, 20:18 UTC
Location: Donetsk

Post by *LonerD » 2013-02-25, 02:01 UTC

Serge1
Thanks.
Bug? - Plugin can't read files with spaces in names.
Suggestion. Show console text with Lister-colors (in my TC lister backgrownd black and text - white).

Suggestion. Open not only console, but any program in lister window (or in left/right panel). For example:

Code: Select all

[ListerPlugins] 
 0=%COMMANDER_PATH%\PLUGINS\wlx\anycmd\anycmd.wlx 
 0_detect="MULTIMEDIA"

[AnyCmd] 
 DetectString=EXT=MP4 
 Command=%COMMANDER_PATH%\SOFT\Media Player Classic Home Cinema\mpc-hc.exe %s 
 Stream=3

sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp » 2013-03-14, 08:18 UTC

Serge1, thank you very much for the update. I grabbed it and it works well for me. I'm using the FIND() detection method. Before anycmd I was using the multilister plugin, which can invoke different commands based on different file extensions - but its multiple detection doesn't mix well with FIND() detection.

nick58
Junior Member
Junior Member
Posts: 19
Joined: 2013-03-17, 21:55 UTC

Post by *nick58 » 2013-03-18, 03:51 UTC

Great idea.
But while there is no possibility to define different commands for different filters - this plugin is not so useful as it could be.

Also, command output displayed in lister with non-standart font.

Serge1
Junior Member
Junior Member
Posts: 15
Joined: 2013-01-10, 00:26 UTC

Post by *Serge1 » 2013-05-17, 14:10 UTC

I would like to announce availability of AnyCmd plugin version 1.2.

This release addresses users' feedback similar to:
nick58 wrote:Great idea. But while there is no possibility to define different commands for different filters - this plugin is not so useful as it could be.
You may install several instances of the plugin in different (sub)directories now. This permits to define several detection string filters and associate corresponding commands in private init files.


I also would like to inform that I am in contact with the Author in relation to the second kind of the feedback:
nick58 wrote: Also, command output displayed in lister with non-standart font.
Best regards,
Serge

Serge1
Junior Member
Junior Member
Posts: 15
Joined: 2013-01-10, 00:26 UTC

Post by *Serge1 » 2013-05-17, 14:46 UTC

Hi LonerD,
LonerD wrote:Bug? - Plugin can't read files with spaces in names
I don't observe problems with file path containing spaces. For example, definition like this:

Code: Select all

[AnyCmd]
command="c:\Program Files\Windows NT\Accessories\wordpad.exe"  %s
DetectString=EXT=TXT
Stream=3
works fine.

My assumption is that quotes should be added to separate file path from parameters in your example.

Just a tip - it is possible to 'debug' configuration by echoing the command line into the lister window itself. For example, the configuration above can be 'visualized' like this:

Code: Select all

[AnyCmd]
command=cmd.exe /c echo "c:\Program Files\Windows NT\Accessories\wordpad.exe"  %s
DetectString=EXT=TXT
Stream=3
LonerD wrote:Suggestion. Open not only console, but any program in lister window (or in left/right panel)
It is possible to open even GUI programs by this plugin. The usage of such scenario is questionable though - usually, GUI programs don't direct their output to stdout/stderr streams.
In addition, I am not aware about possibility to use top level window of an arbitrary application as a child window of another process.

Best regards,
Serge

sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp » 2013-05-21, 06:56 UTC

Hi Serge, thanks for this update!
P.S. sourceforge still lists v.1.1 as the default download.

Serge1
Junior Member
Junior Member
Posts: 15
Joined: 2013-01-10, 00:26 UTC

Post by *Serge1 » 2013-05-22, 21:46 UTC

sgp wrote:P.S. sourceforge still lists v.1.1 as the default download.
Thank you very much for letting me know about this. It should appear updated now.
Serge

Post Reply