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

Re: How to search a folder recursively?

Post by *MVV »

ckazimie wrote: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.

Is it possible?
No, currently it is not possible. I think I will add such feature in next version.



Added:
I forgot that you can use solution that nsp wrote in next post - to use external tool that will enum files and then add files from filelist to folder:
Last edited by MVV on 2010-05-31, 16:24 UTC, edited 1 time in total.
User avatar
nsp
Power Member
Power Member
Posts: 1912
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: How to search a folder recursively?

Post by *nsp »

ckazimie wrote: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?
It is possible but through an external application that build a filelist.

I use a "globbing" application to build a filelist and put the resulting list to the current folder.
If you assume that :
- Auto-Update is the Auto-Update script name,
- you placed in /exec folder a link to a external cmd file that build a filelist.
- the filelist is c:\temp\list01.lst

Code: Select all

>Auto-Update   {<del /f . <exec /w /exec/dolist01.cmd <put /al c:\temp\list01.lst }
You can adapt it with your own parameters if you need an external application to build your filelist you can find it at : Glob
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

It requires to change much to add recursive enum feature, so I think that it would be better to use external enum tool. And, it is more flexible way.

(for linear search I just pass filename with mask, and OS returns one or more filenames that match mask, but for recursive search I need to pass path with "*" mask always - else OS will skip subfolders that doesn't match mask, and manually call same search function for subfolders; and of course I need to check every returned file for matching mask manually)
User avatar
ehab
Senior Member
Senior Member
Posts: 271
Joined: 2007-10-29, 07:41 UTC
Location: Libya

Post by *ehab »

hello MVV,

using TC 7.55 , VP 1.0.0.800

i have virtual files within VP and before i could pass the filename using %O to a bat file. Now it's not possible?

can you please check from your side this repro:

1.

Code: Select all

\>Add	<add ?:Enter key: <silent <save
call the above and type something like

Code: Select all

somefilename

2. within TC Redefine hotkeys menu options- create a shortcut key, and bind it or just call it from cmdline, and have it execute a bat file eg:

Code: Select all

em_tester		d:\Utils\tester.vbs

paramteres %O
run minimzed
3. the bat file

Code: Select all

Option Explicit
If  WScript.Arguments.length = 0 Then
        Wscript.Echo "File Name Missing"
        WScript.Quit(0)
End If

Wscript.Echo WScript.Arguments.Item(0)

4. select the file you created in step 1 and call the command

expected: a message box with somefilename
outcome: File Name Missing

please let me know if this is by TC or some glitch in VP?

thanks and regards
ehab
#181344 Personal licence
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

i have virtual files within VP and before i could pass the filename using %O to a bat file. Now it's not possible?
That was what we're asked for - to retrieve physical filenames :) and we got it... So currently it is a big problem to get virtual filename... I suggested some workaround to Mr. Ghisler and hope he will realize it.

Currently you may use my temporary workaraund - to use %%${}Path%%\"%S1" (or just "%S1") - it should return first of selected names i.e. focused file.

1. Don't forget to quote prompt string if it contains spaces! Else space will break string and next word after space will be treated as next parameter!

Code: Select all

<add ?:"Enter key:" <silent <save
4. I can't reproduce your error. When I put focus onto file created by your script file from 1. (file contains key: as real path since you forgot quotes) message appears with key:, and for any file/folder within VP it shows its name.
User avatar
ehab
Senior Member
Senior Member
Posts: 271
Joined: 2007-10-29, 07:41 UTC
Location: Libya

Post by *ehab »

%S1 is fine thank you MVV and my script is back working : ) happy weekend.

ehab
#181344 Personal licence
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.820:
+ flag 'm' for <save command
+ autosave after every operation feature (only if state was modified) - you may enable it in settings
User avatar
ehab
Senior Member
Senior Member
Posts: 271
Joined: 2007-10-29, 07:41 UTC
Location: Libya

Post by *ehab »

nice 2 c the autosave option. i had that added in all my commands.

haven't tested it yet but just wanted to say

thanks
#181344 Personal licence
User avatar
jdmarch
Member
Member
Posts: 161
Joined: 2003-03-12, 02:34 UTC
Location: Austin, Texas, USA

Post by *jdmarch »

Very nice. For the wish list:

* support Ctrl+B (Branch View)
* In Find Files, support inclusion/exclusion of specific directories
* In Find Files, support Feed to Listbox
* right-click command to copy full filename and path of original file, to clipboard

[Edit] Also:
* support file comments from source directory.
* support Shift+F4 to create a new file in the same directory as the file currently selected, and copy it to the virtual folder.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Please read previous pages, some functions were already discussed (e.g. branch view). Also please read suggestions topic mentioned in first post - it already has some suggestions to TC that can't be supported by Virtual Panel directly (I've added now some of them to that suggestions list) - but only Mr. Ghisler knows if and when theese features will be realized.

What exactly do you mean by 'inclusion/exclusion of specific directories' in Find Files dialog?

Shift+F4 TC processes internally also - I can't do something so you need to create suggestion topic if you wish to see it implemented. Shift+F4 in folder-link I already mentioned in VP suggestions topic but you want some another feature. I think it will be simpler to use some external tool that will accept filename and ask to create new file in same folder.

BTW, file comments are supported, you just need to create custom view with column [=tc.comment] (default 'comments' view not working in virtual panel) - it is mentioned in Readme.txt file. :)

About right-click command to copy full path - I have no such command even in normal folders. :) As you see, TC doesn't support shell extensions in virtual folders. But you may add internal association to external program that will copy passed path, or you may add internal TC command that will pass %P%N and copy it to clipboard - last TC versions expand virtual path to physical in %P%N.
User avatar
Stevie1
Junior Member
Junior Member
Posts: 70
Joined: 2006-09-08, 22:50 UTC

Post by *Stevie1 »

Is it possible to copy/move the whole content of VirtualPanel (without opening it in a tab) to the left/right panel of TC?
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

You may only use TC copy/move/drag-n-drop functions to copy/move file(s) from VP. There is no access to virtual system from external tools.

And, internal scripts don't touch physical files, they work with virtual system only.
User avatar
Stevie1
Junior Member
Junior Member
Posts: 70
Joined: 2006-09-08, 22:50 UTC

Post by *Stevie1 »

Ah okay, fair enough :)
dsscicin
Junior Member
Junior Member
Posts: 19
Joined: 2009-11-03, 13:15 UTC

Post by *dsscicin »

Would it possible to drag-and-drop files in vp to other programs? If so it would be more useful.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I'll answer only once on all six questions. :)
TC doesn't allow it, and I can't realize it w/o TC support.

The only way is to write simple explorer window that will allow dragging files to and from, but it is a bit complex thing.
Maybe I'll realize it for upcoming Virtual Panel 2.0. :)
Post Reply