ZTree.com  | ZEN  | About...  

 Index   Back

[ZEP] New Batch Parameters (revised)   [ZEP]

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

> Is omitting the leading backslash on non-root paths okay?

I've reconsidered my previous "No" response to this.

While including the leading backslash would be consistent with %3, these %b parameters would not have to be consistent with it. In fact, %bf without the leading backslash would offer an alternative to %3 for any operation that might require the backslash to be omitted. Requiring the user to add the backslash would also make the script a bit more readable.

With that said however, I'm curious to understand in what scenario the leading backslash would not be wanted. If you or anyone can explain a case where it would need to be omitted, please do so. It would be better to provide that flexibility if it might be needed.

A downside to having the user supply the leading backslash is the case of %br (branch relative) when the file happens to be in the root directory entered by the Branch command. As pointed out earlier, in this case %br should be blank. So if the user is supplying the backslash, a double backslash will occur when the file with its leading backslash is added.

Since I don't think the %b parameters should be different from each other, I think %bf, %bc and %br should all automatically include a leading backslash to a directory name, and %br should be blank when there is no directory name.

- John


Messages in this Thread

94,751 Postings in 11,947 Threads, 348 registered users, 4 users online (0 registered, 4 guests)
Index | Admin contact |   Forum Time: Feb 25, 2020 - 7:38 pm EST  |  Hits:30,128,224  (7,832 Today )
RSS Feed