ZTree.com  | ZEN  | About...  

 Index   Back

Using the F9 Menu to operate on tagged files   [Q]

By: John Gruener     Orlando, Florida  
Date: Aug 22,2022 at 19:12
In Response to: [Q] F9 Menu Script Assistance (Dan LeGate)

> And... I should have looked closer.
>
> It finally RAN but didn't loop through the tagged Zip files.
> It only acted on the currently highlighted file which
> wasn't tagged, and ignored the tagged files.
>
> I thought that was the whole point of using the ZTTagged=True
>
> I obviously don't get how this is supposed to work. I guess "detect
> the presence of tagged files" isn't the same as act on these tagged
> files when run. Not sure what the value of that is.
>
> Looks like maybe I need to write out a file to process with ZTTag and
> then run my commands?

Yes. All #ZTTagged does is determine whether or not tagged files exist. The Help file is a bit misleading, not only because of REM, but also because "Commands that require tagged files" is not very informative. The only command available in the F9 script that requires tagged files is #ZTTag, which is actually termed a "Directive" rather than a "Command."

Use #ZTTag with the -f parameter to generate a second (yourname).BAT file with a list of command lines which are then executed. See the examples for two methods of doing this. The first is a non-recursive method, which is best used if you have only one command to execute for each tagged file. The second is the recursive method which you CALL once and code it to reenter (CALL) the ZTW_MENU.BAT file for each of the tagged files. This is best used when you have multiple commands to execute for each tagged file.

- John

86 views      
 

Messages in this Thread

 
95,961 Postings in 12,120 Threads, 350 registered users, 51 users online (0 registered, 51 guests)
Index | Admin contact |   Forum Time: Sep 26, 2022 - 9:50 am UTC  |  Hits:50,904,234  (9,022 Today )
RSS Feed