ZTree.com  | ZEN  | About...  

 Index   Back

Re: Working as designed see 3.4.1 Batch Parameters   [Zeta]

By: Art Kocsis     So Calif  
Date: May 10,2015 at 15:57
In Response to: Working as designed see 3.4.1 Batch Parameters (Ben Kent)

> > This F9 Appl Menu Script:
> >
> > REM Upper Case = %%Time%%
> > REM Lower Case = %%time%%
> ...
> > Observations:
> > =============
> > • It only seems to affect the lower case %date% environment variable
> > and only when wrapped with just single "%"s.
> > • The "5-09-15 15:37:16" string varies and always equals the date
> > stamp of the previous generation of ZTW_MENU.BAT
>
> The "3.5 Application Menu" section in the help file, states this
>
> Environment variables can also be used. (See section 3.4 'Batch
> Parameters and Environment Variables' for more information).
>
> and in section "3.4.1 Batch Parameters" in the help file that states
> "The above parameters must all be specified in lower case."
>
> The implication being that upper case stops the Batch Parameters being
> used, and lets you force environment variable use.

No, I don't think so. These are environment variables, not batch parameters.

Kim was careful to emphasize that distinction by explicitly defining the two. The help file text referring to lower case applies to Batch Parameters, not to Environment Variables.

Help file section 3.4.1 lists and defines the Batch Parameters available in application menu script. These are ZTree unique objects. Your quoted statement: "The above parameters must all be specified in lower case." appears near the end of the section and applies only to the items listed "above". In fact, he specifically calls out "above parameters" to further distinguish them from "environment variables" in case there was any doubt. Kim was also careful to use "Batch Parameters" to identify ZTree objects vs "Batch Variables" which identify Windows command file objects. Also note that environment variables, such as %date% and %time%, are "wrapped" with leading and trailing percent glyphs. Batch parameters/variables have only leading percent glyphs.

Kim made a specific distinction re Batch Parameters being in lower case which he can do since he is the God of ZTree. Environment variables are case insensitive Windows objects and out of his jurisdiction. Besides, whatever behavior you might want to attribute to case would apply to all Windows objects. %date% was the ONLY Windows environment variable to exhibit this bug. ALL of the others behaved as case insensitive.

Note that Windows environment variables may be used in the application menu scripts but they are not expanded or evaluated, only passed on to the batch file. The bug is that ZTree corrupted the variable reference instead of just passing it on.


Namaste', Art

Press any key to exit,
Press any other key to continue...
- unknown

1,110 views      
Thread locked
 

Messages in this Thread

 
96,640 Postings in 12,231 Threads, 350 registered users, 54 users online (0 registered, 54 guests)
Index | Admin contact |   Forum Time: Apr 19, 2024 - 2:50 am UTC  |  Hits:62,919,997  (1,177 Today )
RSS Feed