ZTree.com  | ZEN  | About...  

 Index   Back

[ZEP] New Batch Parameters   [ZEP]

By: John Gruener     Orlando, Florida  
Date: Oct 01,2019 at 14:01
In Response to: [ZEP] New Batch Parameters (Hartmut Schneider)

> > I think I'd prefer %b1, which is like %1 without the file name.
> Agreed!

> > So we'd have:
> > %b1 = Branch root path to the file including the drive letter and colon,
> -- C:\AAA\BBB\CCC\DDD\EEE\FFF
> > %bf = Branch Full directory path to the file without the drive letter and colon,
> -- \AAA\BBB\CCC\DDD\EEE\FFF
> > %bc = Branch Current directory path,
> -- *CCC\DDD\EEE\FFF * ( without leading backslash?)
> > %br = Branch Relative directory path,
> -- *DDD\EEE\FFF * ditto?
>
> I have added the AAA... examples.
> Is omitting the leading backslash on non-root paths okay?

No, I don't think so. To be consistent with %3, all path names should begin with a backslash and end without one. This enables consistent addition of a parameter path to a target path. Of course the user could add one, but again that would be inconsistent with %3. The goal here is to be able use %bc and %br to create under a target branch the same directory structure as Alt-Copy/Move would create, so a leading backslash will always be needed.

This does raise an important point though. If the file happens to be in the Current Branch directory entered with the Branch command, then %br will be blank. This is because the file will be placed directly into the current target directory. There is no directory to be created under the target path, and the user must always supply a backslash in front of the file name.

So if the file is in the entered Current Branch directory C:\AAA\BBB\CCC, then:
%b1 = C:\AAA\BBB\CCC
%bf = \AAA\BBB\CCC
%bc = \CCC
%br = (blank)

> BTW: John, Thanks for elaborating this ZEP, concise as usual!

And thank you Hartmut for your thoughtful scrutiny, good points and great questions, as usual! ;-)

- John

971 views      
Thread locked
 

Messages in this Thread

 
96,637 Postings in 12,231 Threads, 350 registered users, 126 users online (1 registered, 125 guests)
Index | Admin contact |   Forum Time: Mar 29, 2024 - 3:44 pm UTC  |  Hits:62,411,587  (26,373 Today )
RSS Feed