[WFX] VirtualPanel: Temporary panel for TC

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Hurdet
Power Member
Power Member
Posts: 620
Joined: 2003-05-10, 18:02 UTC

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *Hurdet »

nsp wrote: 2020-09-12, 07:20 UTC Inside VirtualPanel, if you use %L %UL %WF you get real file names nothing else to do !
Main issue is that VPanel is not aware of selected item and you cannot indicate process with all selected files
My problem is not that it does not recognize the selected files but that it does not correctly report the names and therefore fails to create the list.
if you want virtual names, you have to use %v or %V but you will not get a list file just the file under the cursor
%S will give you list of virtual file name and is the most useful parameter to get selected names.
I do not want virtual names
using vpbatch ^convert command needs 3 parameters:
List, exported text file, VP folder (can be .)
From readme, 3° parameter is optional:
convert <source_filelist_path> <filelist_path> [<virtual_path>]
%F %L are not the useful parameter as by default VP is looking for Unicode and Virtual Names ! (%WF can work if you have exact same names as real file name)
as I have already written I have tried all the variants

documentation of VP and TC are not 100% complete/exact ;)
do use ^ instead of redirection is good practice
<convert command stop at first error :(

Current VPpath is exposed in ${}Path env variable if you have more than one VP you can insert VP name inside the {VPname} !

What you can do is to convert %S parameters as a single file utf-8 or utf-16 with BOM and then process it with convert !
Finally, you tried a button with a string useful for compacting a selection of files from the virtual panel?!?

Converts list of virtual names or paths (that may be got via TC parameters like %F, %L, %WF etc.) into list of physical paths to files.
This not work for me.
User avatar
nsp
Power Member
Power Member
Posts: 1803
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *nsp »

Hurdet wrote: 2020-09-12, 10:01 UTC My problem is not that it does not recognize the selected files but that it does not correctly report the names and therefore fails to create the list.
This is a misunderstanding, TC generates %parameters and if you just want a list of selected file (with physical target) you just have to use %L %UL %WL <convert is not needed.

Code: Select all

command: %comspec% /c
parameter copy %L c:\out\list.txt
This is the way i use VP with TCBL everyday..
Hurdet
Power Member
Power Member
Posts: 620
Joined: 2003-05-10, 18:02 UTC

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *Hurdet »

nsp wrote: 2020-09-12, 16:49 UTC

Code: Select all

command: %comspec% /c
parameter copy %L c:\out\list.txt
This is the way i use VP with TCBL everyday..
this has nothing to do with my problem with VirtualPanel.
Hurdet
Power Member
Power Member
Posts: 620
Joined: 2003-05-10, 18:02 UTC

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *Hurdet »

Reproduce bug example:
  • I create empty Virtual Panel.
    Copy from %SystemRoot%\system32:
    • notepad.exe
      nshwfp.dll
      ntlanman.dll
  • from a button:
    echo %WF & type %WF & pause
    I get:
    K:\TEMP\CMD6E1B.tmp
    notepad.exe
    • notepad.exe
      systemnshwfp.dll
      systemntlanman.dll
VPBatch.exe convert... cannot find "systemnshwfp.dll" and systemntlanman.dll, non work and create only a empty unicode list.
User avatar
nsp
Power Member
Power Member
Posts: 1803
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *nsp »

Hurdet wrote: 2020-09-12, 17:17 UTC VPBatch.exe convert... cannot find "systemnshwfp.dll" and systemntlanman.dll and non work.
As said if you want a list as <convert is supposed to produce just save %WL as a list file from a virtual folder. <convert is useless in this case !

if you want to use convert, the only way is to produce the file in correct format from %S and then use VPBatch ^convert <produced file> <output list> .
and use 3 parameters. Readme for <convert is wrong about %L %F ...!

if VPBatch call returns before end of process, TC can delete file before VPBatch read all the files...
Also, <convert stop at first error !
Hurdet
Power Member
Power Member
Posts: 620
Joined: 2003-05-10, 18:02 UTC

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *Hurdet »

nsp wrote: 2020-09-13, 09:40 UTCAs said if you want a list as <convert is supposed to produce just save %WL as a list file from a virtual folder. <convert is useless in this case !
save %WL as a list file from a virtual folder not produce a list of physical paths to files in virtual panel folder and also the filenames are all wrongs with the exception of the first, as I have already exemplified (systemnshwfp.dll, systemntlanman.dll instead of nshwfp.dll, ntlanman.dll).
So <convert would be very useful in this case, and that's exactly why it exists.
if you want to use convert, the only way is to produce the file in correct format from %S and then use VPBatch ^convert <produced file> <output list> .
and use 3 parameters. Readme for <convert is wrong about %L %F ...!
This method only works because it manually reproduces what ^convert should do automatically.
if VPBatch call returns before end of process, TC can delete file before VPBatch read all the files...
Also, <convert stop at first error !
<convert stop at first error because I suppose VirtualPanel.wfx64 not return correct list %WL.
repeat:
Converts list of virtual names or paths (that may be got via TC parameters like %F, %L, %WF etc.) into list of physical paths to files. Parameter virtual_path sets base virtual path for relative paths in a list (e.g. it should be path to folder with files whose names are listed by %F or %WF);
the readme.txt mention the parameters %F, %L, %WF and never %S because its function is to convert a "list file in the TEMP directory, with the names of the selected files and directories" in Virtual Panel folder, generated by% WF into list of physical paths to files usable by an external command such as a packer.
Example directly from author:

Code: Select all

Command: VPBatch.exe
Parameters: ^convert %F %F.lst .
I hope MVV can take a look at this post.
User avatar
nsp
Power Member
Power Member
Posts: 1803
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *nsp »

Erratum: this seems to be a bug TC/VP

TC before 9.20 was generating in %L... %F with virtual names and this can be used by <convert
Starting in 9.20 %L %F seems to not work anymore even if after 9.21 %C1 C2 .....C9 gives you full real names.

%L %F ... seems to be ok with first file only but completelly wrong with the next... (use a 20c buffer for path and add real file name for other files, this lead to stange error with name...
Hurdet
Power Member
Power Member
Posts: 620
Joined: 2003-05-10, 18:02 UTC

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *Hurdet »

Finally agree with me that that there is a bug.
So do you think it depends more on TC than on VP?
Should we report it to Ghisler?
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *MVV »

Well, I've tested <convert myself with some files from System32 and confirm that it only converts first filelist item, that's sad.

But it looks like a TC bug, not a VP bug!

When I execute a command for VirtualPanel with %F, I get invalid filelist (notice extra prefixes in all lines except first one):

Code: Select all

activeds.tlb
activeds.actxprxy.dll
activeds.adal.dll
activeds.AdapterTroubleshooter.exe
When I execute a command for VirtualPanel with %WL, I get invalid paths too:

Code: Select all

activeds.tlb
System32actxprxy.dll
System32adal.dll
System32AdapterTroubleshooter.exe
But as you can see in VirtualPanel.log, FsGetLocalName returns valid physical paths:

Code: Select all

09:33:16   4080	FsGetLocalName:	"\0\actxprxy.dll" is "C:\Windows\System32\actxprxy.dll"
And it works OK with TC 8.52, TC 9.12, but fails in TC 9.20 and further versions. And there were no WFX API changes so all TC versions should work in the same way. So yes, we should report this as a bug, and test which %-parameters are affected.

Anyway, please keep in mind that %F in this example is for the case when your virtual names are the same as real ones, in such case <convert may help to get real paths. The main problem is that %F, %L and others are controlled by TC only, VP can't do anything with it.
Last edited by MVV on 2020-09-14, 06:54 UTC, edited 2 times in total.
Hurdet
Power Member
Power Member
Posts: 620
Joined: 2003-05-10, 18:02 UTC

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *Hurdet »

I opened un TC bug.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *MVV »

Thank you!

As a workaround, you can currently use SAVESELECTION command for TC, it saves list with virtual names. If you want to batch it, create em_SaveSelection command with SAVESELECTIONW command and %A parameter and call it from batch with e.g. TCFS2:

Code: Select all

TCFS2.exe /ef tem(`em_SaveSelection "D:\temp.lst"`)
This will produce a Unicode filelist that may then be passed to VPBatch ^convert (note that you have to double ^ characters in batch files or cmd.exe command line - I didn't know that when selected ^ as a default replacer for <):

Code: Select all

VPBatch.exe ^^silent ^^convert D:\temp.lst D:\temp-real.lst .
Hurdet
Power Member
Power Member
Posts: 620
Joined: 2003-05-10, 18:02 UTC

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *Hurdet »

When i use em_SaveSelection I get a list f.e.:
test\
file1.cmd
file2.cmd

when I convert I get only:
c:\path\file1.cmd
c:\path\file2.cmd

and not get files in test folder.
I have to manually modify list to:
test\*.*
file1.cmd
file2.cmd

to get also files in test folder.
Perhaps convert would work fine with a list generated with %F which is currently not working due to a bug.
But is it still possible to code VPBatch.exe to treat names with a ending trailing slash as a folder and automatically add *.* to process the folder inside files?
Hurdet
Power Member
Power Member
Posts: 620
Joined: 2003-05-10, 18:02 UTC

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *Hurdet »

Code: Select all

TCFS2.exe /ef tem(`em_SaveSelection "D:\temp.lst"`)
or

Code: Select all

TCFS2.exe /ef tem(`cm_SaveSelection "D:\temp.lst"`)
save only in tc memory.

cm_SaveSelectionToFile
instead prompt filename.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *MVV »

In my example em_SaveSelection is a new em-command that just executes SAVESELECTION command, it is not related to cm_SaveSelection that just saves selection to memory.

%F doesn't enumerate nested items also.
Hurdet
Power Member
Power Member
Posts: 620
Joined: 2003-05-10, 18:02 UTC

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *Hurdet »

MVV wrote: 2020-09-15, 05:50 UTC In my example em_SaveSelection is a new em-command that just executes SAVESELECTION command, it is not related to cm_SaveSelection that just saves selection to memory.
Ok, but where I find em_SaveSelection custom definition?
Without it your example would be useless.
%F doesn't enumerate nested items also.
ok, %F doesn't enumerate nested items, but save folder path as "path\".
it would be enough to program VPBatch.exe to deal "path\" as it deal "path\*.*"
Post Reply