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.

Revision:
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

33 views      
 

Messages in this Thread

 
94,499 Postings in 11,924 Threads, 348 registered users, 16 users online (1 registered, 15 guests)
Index | Admin contact |   Forum Time: Oct 23, 2019 - 7:26 pm EDT  |  Hits:28,802,240  (5,988 Today )
RSS Feed