[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
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

jvh,
Thank you, translation updated.


I've fixed some old bugs.
* correct icons for inaccessible files (like pagefile.sys)
* explorer: paths for subfolders of links to physical folders haven't displayed in title

Beta 1260
User avatar
ehab
Senior Member
Senior Member
Posts: 271
Joined: 2007-10-29, 07:41 UTC
Location: Libya

Post by *ehab »

is there an option to silently remove those not found physical files from VP list?

would be great to have this option in the settings check list.
" List only found files " or similar.

so instead of show Removed file icon it will not show it at all.

i mostly use VirtualPanel2 to sync dirs and some physical files are deleted infact many.

i hope this is possible MVV, otherwise maybe you have a magical script that does same job with out reading the dirs-files again.

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

Post by *MVV »

Currently validity check for icon is in FsExtractCustomIconW function which is completely independent from FsFindFirstW so it will require to do additional check per file to filter invalid items.

Actually you can use <ifcond command and its valid field in order to remove invalid items.

E.g. this command line command will show a message for every invalid file in current folder (I check if files are invalid and if they are not scripts):

Code: Select all

<for %f . * { <ifcond {!valid && !script @ %f} { <ifok "%f" {} } }
This one will silently remove all invalid items:

Code: Select all

<for %f . * { <ifcond {!valid && !script @ %f} { <del "%f" } }
You can write recursive script that will browse all folders and use similar command to remove invalid items. Example of recursive script is in the Readme file. You can even insert such script into >Autoexec script to get it automatically executed on VP loading in order to silently remove invalid items. I think something like this should work:

Code: Select all

<add \>rdelbad { <silent <for %%f . "|>*" { <ifcond { !valid && !script @ %%f } { <del "%%f" } } <for /d! %%d . * { <cd "%%d" <exec \>rdelbad } }

Code: Select all

<add \>Autoexec { <cd \ <exec \>rdelbad }
Note that last version allows to use "|>*" mask to exclude script files instead of ifcond's script field (but I think it won't hurt to check both conditions).
User avatar
ehab
Senior Member
Senior Member
Posts: 271
Joined: 2007-10-29, 07:41 UTC
Location: Libya

Post by *ehab »

wow, i'm going to explore the scripts now. Thank you for your fast response.
#181344 Personal licence
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Just be careful, it may delete some items that you may want to keep. You can call >rdelbad from >Autoexec multiple times from different directories (using pairs of <cd and <exec commands) instead of calling it once for entire VP contents. And it is a good practice to save and backup your list before experiments. :wink:


I've released the latest version.

Virtual Panel 2.0.6.1262 (changes since last released 2.0.5.1228):
+ <convert command
+ multiple include/exclude masks support in <for, <export, <save commands
+ flag 'e' for <save, <export commands
* <save command is not recursive by default now (use 'r' flag)
* null characters in ANSI exported lists
* correct icons for inaccessible files (like pagefile.sys)
* explorer: paths for subfolders of links to physical folders haven't displayed in title

:)
User avatar
ehab
Senior Member
Senior Member
Posts: 271
Joined: 2007-10-29, 07:41 UTC
Location: Libya

Post by *ehab »

MVV

i did delete some files and i got a bit frustrated since i used real files instead of test one... my mistake ,,, i have backups : ) thank allah for that.

i will test again the update feature, yes i need more than remove deleted files, i also need modified.

i tried to script but found it needs practice. i work harder and if i fail i will nag again :D
User avatar
tuska
Power Member
Power Member
Posts: 3760
Joined: 2007-05-21, 12:17 UTC

Post by *tuska »

Hello MVV,
would it be possible to integrate Branch View (Ctrl + B)?

Kind regards,
Karl
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ehab, good luck :) if you find something that may be improved - welcome!

tuska, sorry, no, TC doesn't allow to use branch view in FS plugins (it was already discussed).
billiebub
Member
Member
Posts: 187
Joined: 2011-04-12, 19:49 UTC

Post by *billiebub »

MVV,

How do you handle circular references? I suppose you keep recursively iterating till TC decides to take a vacation.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

billiebub wrote:How do you handle circular references? I suppose you keep recursively iterating till TC decides to take a vacation.
Please provide some examples, don't understand how you get 'em with such plugin, links within virtual filesystem are not supported. If you're talking about junctions/symlinks through a link to physical folder -- I don't handle them at all, so it is TC who decides when to stop.
billiebub
Member
Member
Posts: 187
Joined: 2011-04-12, 19:49 UTC

Post by *billiebub »

I was talking about symlinks. Symlinks that point to their parents (physical folder) which would then create a circular reference.

Example:

Directory: c:\tools
Create symlink "tools" in directory c:\tools. Do a copy of c:\tools to VirtualPanel. Wish TC a Marry Christmas on the way out.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

As I see, TC itself doesn't allow to enter 33rd subfolder 'tools' so it stops there. BTW FS plugins don't get folder path to be copied, they only receive commands to create new dirs and to add files, there is no command to copy entire folder with its contents.

Anyway it is on the user who creates such links. It is impossible to predict all things that users may invent. Especially things that are completely useless.
billiebub
Member
Member
Posts: 187
Joined: 2011-04-12, 19:49 UTC

Post by *billiebub »

that's like saying the use of buffer overflows is completely useless where hackers see it a way to crash a system, escalate privileges, execute arbitrary code, etc.

Coming from a security profession, I would really do a check limit on the number of circular referenced directories to make sure I stay within boundaries. Other than that, keep up the good work :)
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Folder loops are completely useless. Folder links not. BTW while buffer overflow may be used to get some benefits, I don't see what one may get from folder loops, it is not a security problem.

And, if you need loop protection, it should be embedded into TC and not into EVERY plugin.
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

Thanks for the update! The new <convert command works well to replace postprocessing <save's output to extract real paths.
MVV wrote: I've released the latest version. [...]
Virtual Panel 2.0.6.1262 (changes since last released 2.0.5.1228): [...]
+ flag 'e' for <save, <export commands
* <save command is not recursive by default now (use 'r' flag)
[...]
I seems the readme file is incomplete:
- Russian: no mention r flag for <save
- English: no mention e and r flags for <save; no mention e flag for <export.

Readme describes <convert as:
convert <source_filelist_path> <filelist_path> [<virtual_path>]
what is the purpose of [<virtual_path>] ?
Post Reply