|Printer Version||Table of Contents||Project Home Page|
CALL A BATCH FILEThe most basic way to put Fdate's output into an environment variable, although not the most convenient, is to:
Fdate /Ff /Atoday /O"mn zd, ccyy" /P"@SET Fdate=" >JUNKTEMP.BAT call JUNKTEMP.BAT del JUNKTEMP.BAT
USE AN ENVIRONMENT-MANIPULATION UTILITYThere are shareware and freeware utilities that are written specifically to manipulate environment variables. Fdate's output can be put into an environment variable by piping it to one of these utilities.
Fdate's /V PARAMETERStarting with version 6.1, Fdate supports a /V (environment variable) parameter. A user can use /V to tell Fdate to put its output directly into an environment variable in the parent environment. For example:
Fdate /Ff /VDATE1will set the environment variable DATE1 to the current date. If you type SET at the DOS prompt, you should see something like:
DATE1=Friday February 14, 1992If you specify /V without an evar name, the evar name defaults to Fdate.
Example : Fdate /Ff /V produces: Fdate=Friday February 14, 1992
Fdate's /V PARAMETER CAN NOT ALWAYS BE USEDNOTE HOWEVER that the /V parameter WILL NOT WORK under Windows NT, Win2k, or XP. see TOPIC Problem - /V Does Not Work Under NT, Windows2000, XP