Now there are only a few subfolders but they can be added (every months).MVV wrote:How many subfolders do you have in c:\TEMP? Currently you can't add directory structure using <put, it works only with single folder or filelist.
[WFX] VirtualPanel: Temporary panel for TC
Moderators: Hacker, petermad, Stefan2, white
You should execute script >Test itself - it is test script and not command that creates it.
It should show message box for each file in folder - look onto file names in message text (press Escape to interrupt script).

I think it is easier to create subfolder and add separate script file manually per month than build heavy scripts.pvav68 wrote:Now there are only a few subfolders but they can be added (every months).
I execute commandMVV wrote:You should execute script >Test itself - it is test script and not command that creates it.It should show message box for each file in folder - look onto file names in message text (press Escape to interrupt script).
Code: Select all
<for %%f . * {<ifok "%%f" {} {}}
Could I create the file list , add subfolders every month there and somehow load the file list by script?MVV wrote:I think it is easier to create subfolder and add separate script file manually per month than build heavy scripts.
Hm-m, if we think a bit, we doesn't need a list file at all. 
Create a script in root dir with name \>ClearFolder with contents (it just removes all objects except scripts from folder passed as parameter):
Special script in root dir \>UpdateBigXLS:
Special intermediate script \>UpdateBigXLS2:
So you need to execute \>UpdateBigXLS and it will clear existing \BigXLS folder and then call \>UpdateBigXLS2 which will recursively recreate its subfolders with refresh scripts that use corresponding subfolder of C:\TEMP folder (it loads all dirs from physical folder to get their names and then replaces them with virtual folders).
Each refresh script will call \>ClearFolder script and then load *.xls files from its folder and then delete all files smaller than 100k except scripts - so it won't remove itself. 
Note1: of course you may remove <ifok "%1 from %2" {} {} from second script file - it was used just for testing.
Note2: %%%% in script is used because we need to put %% into refresh script file (we need to double number of % characters).
Note3: %f parameter doesn't work for you just now because of bug, but %~f should work.
Changed UpdateBigXLSLoop to UpdateBigXLS2 in third code block.

Create a script in root dir with name \>ClearFolder with contents (it just removes all objects except scripts from folder passed as parameter):
Code: Select all
<silent <ifexist "%1" { <cd "%1" <for /d %%f . * { <ifcond { !script @ %%~f } { <del /rfd "%%~f" } } }
Code: Select all
<silent <add "\BigXLS" <del /rfd "\BigXLS\*" <exec \>UpdateBigXLS2 "\BigXLS" "C:\TEMP"
Code: Select all
<silent <ifdef "%2" { <ifok "%1 from %2" {} {} <cd "%1" <add >Refresh { <exec \>ClearFolder . <put /a . "%2\*.xls" <for %%%%f . * { <ifcond { !script && (size < 102400) @ %%%%~f } { <del "%%%%~f" } } } <put /ad! . "%2\*" <for /d! %%d . * { <del /d "%%d" <add "%%d" <exec \>UpdateBigXLS2 "%%~d" "%2\%%~d" } }


Note1: of course you may remove <ifok "%1 from %2" {} {} from second script file - it was used just for testing.
Note2: %%%% in script is used because we need to put %% into refresh script file (we need to double number of % characters).
Note3: %f parameter doesn't work for you just now because of bug, but %~f should work.
Changed UpdateBigXLSLoop to UpdateBigXLS2 in third code block.
Last edited by MVV on 2011-04-11, 06:14 UTC, edited 1 time in total.
You should modify script of MMV ... usepvav68 wrote:Sorry MMV, but until now I found that it works only with root folder "C:\TEMP" but does not work with subfolders. Subfolders with big xls files are not added to "\BigXLS".
Code: Select all
....<exec \>UpdateBigXLS2...
Code: Select all
....<exec \>UpdateBigXLSLoop...
Yes, I forgot to add it at the beginning of refresh script.pvav68 wrote:I only have to add one "<silent" to script >UpdateBigXLS2 (before <put /a . "%2\*.xls" ...).

You're right, I've corrected my post some times during experiments and then changed second script name to UpdateBigXLS2 but forgot to change its name here.nsp wrote:You should modify script of MVV ... usepvav68 wrote:Sorry MVV, but until now I found that it works only with root folder "C:\TEMP" but does not work with subfolders. Subfolders with big xls files are not added to "\BigXLS".Instead ofCode: Select all
....<exec \>UpdateBigXLS2...
Code: Select all
....<exec \>UpdateBigXLSLoop...

I have changed UpdateBigXLSLoop to UpdateBigXLS2 but it did not help.
When I execute \>UpdateBigXLS, these windows are opened:
\BigXLS from c:\TEMP
C:\TEMP\* loaded 2 entries
Folder01 from C:\TEMP\Folder01
C:\TEMP\Folder01\* loaded 0 entries
Folder02 from C:\TEMP\Folder02
C:\TEMP\Folder02\* loaded 0 entries
Folder01 and Folder02 are subfolders in C:\TEMP and there are xls files >100KB.

When I execute \>UpdateBigXLS, these windows are opened:
\BigXLS from c:\TEMP
C:\TEMP\* loaded 2 entries
Folder01 from C:\TEMP\Folder01
C:\TEMP\Folder01\* loaded 0 entries
Folder02 from C:\TEMP\Folder02
C:\TEMP\Folder02\* loaded 0 entries
Folder01 and Folder02 are subfolders in C:\TEMP and there are xls files >100KB.
I think it is time to release Virtual Panel 2.0.
VirtualPanel 2.0.0.1080 (changes after 1.0.0.920):
+ virtual explorer allowing to have any number of browser windows
+ virtual explorer interface tries to copy TC style
+ drag-n-drop support between virtual browser windows and external applications
+ new log event for Virtual Explorer actions
+ max state file line length now 8k characters
+ <put command may add folders from lists created via e.g. cm_SaveSelectionToFile (trailing folder slashes are now stripped)
+ <edit command now allows to edit empty targets for files
* recursive intermediate folders creation bug (after some changes in 1.0.0.920)
* <for command produced wrong names
* bits 0x01 and 0x02 of LogEnabled parameter exchanged
* log string format for FsPutFile slightly changed
VirtualPanel 2.0.0.1080 at totalcmd.net
Please note that files and folders are now dragged to external applications only with their real names and not with virtual names that you see inside of virtual folders (it is neccessary to copy files to temporary folder in order to drag them with real names, this isn't realized yet). Also drag to physical folders within browser windows is not supported yet too. Folder tree is not ready yet too (but there is reserved place for it and separator may be moved already).
VirtualPanel 2.0.0.1080 (changes after 1.0.0.920):
+ virtual explorer allowing to have any number of browser windows
+ virtual explorer interface tries to copy TC style
+ drag-n-drop support between virtual browser windows and external applications
+ new log event for Virtual Explorer actions
+ max state file line length now 8k characters
+ <put command may add folders from lists created via e.g. cm_SaveSelectionToFile (trailing folder slashes are now stripped)
+ <edit command now allows to edit empty targets for files
* recursive intermediate folders creation bug (after some changes in 1.0.0.920)
* <for command produced wrong names
* bits 0x01 and 0x02 of LogEnabled parameter exchanged
* log string format for FsPutFile slightly changed
VirtualPanel 2.0.0.1080 at totalcmd.net
Please note that files and folders are now dragged to external applications only with their real names and not with virtual names that you see inside of virtual folders (it is neccessary to copy files to temporary folder in order to drag them with real names, this isn't realized yet). Also drag to physical folders within browser windows is not supported yet too. Folder tree is not ready yet too (but there is reserved place for it and separator may be moved already).
But subfolders Folder01 and Folder02 are not cerated (or maybe they are immediately deleted by script).MVV wrote:pvav68, UpdateBigXLS only loads and creates folders, it doesn't load any files. Files will be loaded by refresh scripts that are also created by UpdateBigXLS in every added subfolder of \BigXLS.
If you get message "Folder01 from C:\TEMP\Folder01" script have loaded folder link and is going to replace it with virtual folder with refresh script.
I just tried it once more using all three script files in my post - all work fine, all folders are created, and when I execute refresh script, it loads *.xls files and then removes small ones.
Using last VP version you may debug script - open Virtual Explorer window using command <explore and execute UpdateBigXLS from it. Then click buttons in messages and check in TC panel what's happened (script will block virtual explorer and not TC).
You may disable auto-refresh for tests to prevent refresh scripts to be executed.
I just tried it once more using all three script files in my post - all work fine, all folders are created, and when I execute refresh script, it loads *.xls files and then removes small ones.
Using last VP version you may debug script - open Virtual Explorer window using command <explore and execute UpdateBigXLS from it. Then click buttons in messages and check in TC panel what's happened (script will block virtual explorer and not TC).
You may disable auto-refresh for tests to prevent refresh scripts to be executed.
MVV do you have a working sample of ifcond with like operator?
I have such expression in a script but it seem that nothing hapend
%%f is pointing to virtual link \TC\Plugin list\virtualpanel.wfx real file is C:\tools\TC\addons\VirtualPanel\virtualpanel.wfx
thx.
I have such expression in a script but it seem that nothing hapend

Code: Select all
<ifcond { like "*.wfx" @ %%f } { <ifok "I'm in"{} }{ <ifok "I'm out"{} }
thx.