ZTree.com  | ZEN  | About...  

 Index   Back

[ZEP] New Batch Parameters   [ZEP]

By: John Gruener     Orlando, Florida  
Date: Oct 01,2019 at 10: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,
> > %bf = Branch Full directory path to the file without the drive letter and colon,
> > %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


Messages in this Thread

94,751 Postings in 11,947 Threads, 348 registered users, 28 users online (0 registered, 28 guests)
Index | Admin contact |   Forum Time: Feb 24, 2020 - 10:58 am EST  |  Hits:30,114,045  (5,141 Today )
RSS Feed