ZTree.com  | ZEN  | About...  

 Index   Back

[ZEP] A new % value   [ZEP]

By: John Gruener     Orlando, Florida  
Date: Jun 30,2019 at 16:29
In Response to: [ZEP] A new % value (Walt)

> I would like to request %c (child) be added to the list of
> Batch Parameters.
>
> >> Given the directory structure: C:\AAA\BBB\CCC\DDD\EEE\FFF
> >> CCC is the currently directory
> >> %c returns DDD\EEE\FFF
>
> Potential enhancement:
> %c0 returns CCC\DDD\EEE\FFF
> %c1 returns DDD\EEE\FFF
> %c2 returns EEE\FFF
> etc.
>
> Whatcha think?

As Hartmut said, it might be useful to have the relative directory path to a file from the current directory.

But first I think we should clarify what "current" means. Batch parameters do not treat "current" the same as the Alt-Copy/Move commands do. This can lead to some confusion. In the Showall/Global (SG) FWs, Alt-Copy/Move treat "current" as the root of the drive, and in the Branch (and of course Normal) FWs it's the highlighted directory from which the FW is entered.

Batch parameters on the other hand treat "current" as the directory in which the highlighted file resides. This includes %6, %n, %e and %p. Note that in terms of the batch parameter %p, calling this proposed path the "child" would have no relation to what is called the "parent".

What it does relate to is %r, the "Root of Branch". It is indeed a "child" of that path, but only when in a Branch FW. In an SG FW, %r has absolutely no relation to the path to any highlighted file. It would only be a coincidence when it does. So choosing "from the BSG list" as you suggest in your second post, is not workable. (In fact the usefulness of %r in an SG FW is questionable, and perhaps should be left blank.)

Clearly then the only time %c should contain a path would be in a Branch FW, and then only if the highlighted file was in a subdirectory of %r, and only in the File Mode (not Directory Mode).

I think adding %c0, %c1, etc. would further complicate this, while adding little functionality. The main purpose is to have the path to the file relative to %r. So %c should suffice.

I share Ben's concern about confusing the proposed %c with "current". Also, as I mentioned, it could be confused with relating it to the batch parameter %p, "parent". But frankly I cannot think of a better mnemonic. Others such as %b might be even more confusing. So as long as it's explained in the Help file that it's a "child" of the Branch Root, %r, calling it %c would be OK.

- John

1,135 views      
Thread locked
 

Messages in this Thread

 
96,637 Postings in 12,231 Threads, 350 registered users, 61 users online (0 registered, 61 guests)
Index | Admin contact |   Forum Time: Mar 28, 2024 - 3:21 pm UTC  |  Hits:62,371,371  (23,768 Today )
RSS Feed