autoselect viewer plugin by folder name?

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
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

autoselect viewer plugin by folder name?

Post by *sgp »

Background
I have many groups of files which aren't allowed to have a filename extension that defines their file type. I would like to view such files with a custom viewer. Since the folder that holds the files has a fixed name (MyAppata), I though I could use the folder name, instead of the missing filename extension, to start the custom viewer automatically.
Currently my custom viewer is a CMD.exe batch file which outputs a converted txt version of its input file, then I view the txt file with F3 and quick view. Finally I delete the txt file. This is tedious.

Questions:
1. How can I convert the batch file into a totalcmd viewer plugin so that the viewing process (especially quick view) is automated? Note: I have never done a totalcmd plugin.
2. Can a viewer plugin be invoked by folder name as described in the background?
3. Maybe a viewer plugin isn't the right idea, any other ideas to offer?

Thank you in advance
User avatar
nsp
Power Member
Power Member
Posts: 1917
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: autoselect viewer plugin by folder name?

Post by *nsp »

sgp wrote:Background
I have many groups of files which aren't allowed to have a filename extension that defines their file type. I would like to view such files with a custom viewer. Since the folder that holds the files has a fixed name (MyAppata), I though I could use the folder name, instead of the missing filename extension, to start the custom viewer automatically.
Currently my custom viewer is a CMD.exe batch file which outputs a converted txt version of its input file, then I view the txt file with F3 and quick view. Finally I delete the txt file. This is tedious.

Questions:
1. How can I convert the batch file into a totalcmd viewer plugin so that the viewing process (especially quick view) is automated? Note: I have never done a totalcmd plugin.
2. Can a viewer plugin be invoked by folder name as described in the background?
3. Maybe a viewer plugin isn't the right idea, any other ideas to offer?

Thank you in advance
For now, F3/F4 command do not allow to launch a lister for a folder !
Anyway QuickView can call a dedicated lister for folder (see VisualDirSize) ! A user command can also call a dedicated lister for any selection (including folder) using the following command :

Code: Select all

command: %COMMANDER_PATH%\TOTALCMD.EXE /S=L:P__wlx_name__
parameter: %Z%P%N
You can also use a hotkey for this command !

Using a bat file inside as a lister could be done using multilister but I suspect that multilister only works on file... You could probably ask the author how to make it works it done also for directory ??

Some lister have source code, you get a look in totalcmd.net most of them use delphi or visual C++...


anyway if you want to see smth and have a quickview feature lister plugin is on the track ![/code]
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Re: autoselect viewer plugin by folder name?

Post by *sgp »

nsp wrote: Using a bat file inside as a lister could be done using multilister but I suspect that multilister only works on file... You could probably ask the author how to make it works it done also for directory ??
Thank you, nsp, for all that information. Your point above put me on track. I looked at multilister and found that it can do all I need, except for one thing: it can't start a specific filter according to the folder where a file is located (instead of according to the filename extension).

I sent a message to the plugin author. Hopefully he will consider adding this feature to his plugin, which by the way is very impressive. I didn't realize before how flexible a plugin multilister is. I thought it was only for viewing PDF files, like the new sumatrapdf plugin.
Post Reply