Run python script at TC

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
jotto
Junior Member
Junior Member
Posts: 2
Joined: 2015-12-05, 21:39 UTC

Run python script at TC

Post by *jotto »

I've got a script that accepts a path as an external argument and I would like to attach it to Total Commander.
So I need a script/plugin for TC that would pass a path of opened directory as an argument and run a Python script which is located for example at C:/Temp

How can I achieve this?

Best Regards, Marek
hi5
Power Member
Power Member
Posts: 637
Joined: 2012-11-03, 11:35 UTC
Contact:

Post by *hi5 »

I don't think you need a plugin for that. There are various methods you could use to get the current path.

You can type in the command line and press CTRL+P to copy current path to command line. So you can type

python c:\temp\script.py

and then press CTRL+P, or press CTRL+P and insert the script before it.

Easier would be to create a button in the button bar and use %p as a parameter (right click on the button bar, change, press F1 for more info)

Or you can create a new entry in the Start menu and again use %p and also assign a key board shortcut to it.
jotto
Junior Member
Junior Member
Posts: 2
Joined: 2015-12-05, 21:39 UTC

Post by *jotto »

Hello,

Thanks for answer. I managed to do it. I have described it here: /a/34111754/4151075

Jest paste it after stackoverflow com.

Best Regards,
Marek
Post Reply