[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: Hacker, petermad, Stefan2, white

Post Reply
alfa
Junior Member
Junior Member
Posts: 9
Joined: 2010-04-26, 21:25 UTC

Post by *alfa »

thank you very much :)

now can you tell me how i can make it refresh everytime i load TC or refresh the folder ? :D
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

As I said, and as Readme tells, you need to enable autoupdate scripts and give to this script file same name as autoupdate scripts have. Open plugin properties, switch to Settings tab, type some script name in field 'Autoupdate script name' (e.g. >Refresh or >Update), check option 'Autoupdate scripts' and give to our little script same name as you typed to 'Autoupdate script name' field.

Then you may check how it works. E.g. open virtual video folder, then rename/add/remove any file in G:\Video or H:\Video and press F2 in panel with virtual video folder. VP will execute script when TC will ask for folder contents and retrieve updated contents. :)
alfa
Junior Member
Junior Member
Posts: 9
Joined: 2010-04-26, 21:25 UTC

Post by *alfa »

Cheers :) thanks a lot for the patience :D
dancier
Junior Member
Junior Member
Posts: 20
Joined: 2007-06-09, 01:36 UTC
Location: Aus

Post by *dancier »

If I want to refresh specific folders or the whole drive could I use the script below. If that’s not possible then being able to search through the folders would be great. I’ve tried to create hard links but don’t have the correct permissions. In the P:drive on the server I might be searching through 25 or 100 folders per search and it can be rather time consuming.
<add >Refresh { <silent <del *.*<put . "P:*.*" <put /l . "P:*.lst" }
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Well, you can't create junctions for folders in non-NTFS volumes like mounted network drives.


If you want to add whole contents of P: drive to some virtual folder and refresh it automatically following script should be enough:

Code: Select all

<add >Refresh { <silent <for /d %%f . * { <ifcond { !script @ %%f } { <del /rfd "%%f" } } <put /d . P:\* }
After cleaning <put command will add whole P:\ contents (all files and folders) to current virtual folder.


If you have somewhere text file with list of files/folders that you want to see in some virtual folder (paths w/o trailing slash!), you may use following script:

Code: Select all

<add >Refresh { <silent <for /d %%f . * { <ifcond { !script @ %%f } { <del /rfd "%%f" } } <put /adl . "C:\path\to\filelist.txt" }
After cleaning <put command will add files/folders from specified filelist to current virtual folder (new items will be autorenamed if objects with same name already exist).


First part of both scripts will clear all folder contents except script files before filling with actual contents.
dancier
Junior Member
Junior Member
Posts: 20
Joined: 2007-06-09, 01:36 UTC
Location: Aus

Post by *dancier »

Thank you for the information, when I get back to work I'll have play. :D
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

VirtualPanel 1.0.0.800: :)
+ always starts executables (.exe, .lnk, .cmd, .bat, .com) itself to set right working path
+ overwrites list files w/o deleting (preserves attributes and permissions)
* wrong working path for executables started from command line within virtual folder

Now it is possible to keep default filelist in write-protected folder (with full permissions for just that file).
User avatar
zhv
Junior Member
Junior Member
Posts: 76
Joined: 2006-03-11, 14:54 UTC

Post by *zhv »

Thanks for your good work!

Just one suggestion:

could it support user defined folder icon?
only folder icon not coincide with the IconLib user configured now.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Folders that are created by TC's F7 or when copying are virtual folders, so you can set icons for them (from configuration dialog or INI file). Folders that are created by <add command (and subfolders) are links to physical folders and have same icon as any folder in TC (TC sets this icon itself) so you should change it in TC.

Or TC's custom folder icon from icon lib is not shown within VP? I'm not using any icon libs so can't check it.
User avatar
zhv
Junior Member
Junior Member
Posts: 76
Joined: 2006-03-11, 14:54 UTC

Post by *zhv »

It's clear! Thx a lot!
ricobautsch
Member
Member
Posts: 103
Joined: 2005-06-21, 00:42 UTC

Post by *ricobautsch »

Very helpful plugin, thank you.

The icons for real and virtual folders looks very similar.
So i tried to set the VirtualFolderIcon property in the settings.
I tried a ico file and also a dll with index.
But nothing was changing the default icon for virtual folder.

Where's the problem, what's going wrong?
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

It works fine for me. How I check it:
1. Open VP and create new test folder (e.g. "00").
2. Type <prop and press Enter, switch to second dialog tab.
3. Type e.g. "shell32.dll,23" to "Virtual folder icon:" field and press Apply.
4. Change dir to any other and back, folder "00" (and all other virtual folders) should change its icon (I saw icon with question mark for specified icon).

Also I tested just now icons "C:\WINDOWS\explorer.exe,1" (full path with icon index) and "D:\1.ico" - all work fine.

If you're trying to directly edit INI file, you should close TC before else plugin will overwrite settings on next exit.


Note that TC asks for folder icons only when you change folder, but not when you press F2 (Ctrl+R), so folder change is necessary. And, only virtual folder icon may be changed, icon for physical folder link (that was made using <add command or my buttonbar button "Add object to virtual panel...") is always just as any folder icon in TC - so user will see that this folder shows physical contents...
ricobautsch
Member
Member
Posts: 103
Joined: 2005-06-21, 00:42 UTC

Post by *ricobautsch »

Now i also tried this on my computer in the office.
Here it works.

Yesterday i was on my computer at home, and there i had no success.

The difference is:
@office: Windows Vista 32bit
@home: Windows 7 64 bit

But maybe i did something wrong at home. I will try it again.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Please write about results. I will also try it under 64-bit Windows 7 in few days.
ckazimie
New Member
New Member
Posts: 1
Joined: 2010-05-29, 20:32 UTC

How to search a folder recursively?

Post by *ckazimie »

Hi,

I would like to write a script to update my virtual panel directory with the result of a search on a real folder, however I would like to search this folder recursively.

For instance, I would like to write a refresh script that would put all pdf documents from my c:\Books directory to a virtual folder \pdf, however, pdf documents in c:\Books can be place inside of sub-folders at an arbitrary depth. Is it possible?
Post Reply