Printer Version Table of Contents Project Home Page
.TOPIC.......: Problem - /V Does Not Work Under NT, Windows2000, XP
.DISCUSSION..:
There are two problems that people commonly report when attempting to run Fdate under Windows NT (and its derivatives, Win2000 and Windows XP). One is that they run out of environment space. The other is that the /V parm does not work, and Fdate's output is not being put into an environment variable. These problems will apply to all versions of NT, including NT 4.0, Window2000, and XP.

/V DOES NOT WORK

The bottom line is that Fdate's /V feature doesn't work under Windows NT, 2k, or XP. Microsoft never made it easy to access the environment programmatically, and the situation became worse in Windows NT, to the point where TurboPower Software, which markets add-on utilities, withdrew support for utilities that change environment variables. Since Fdate uses these utilities, Fdate's /V feature will not work under NT, 2k, or XP.

This does not mean, however, that Fdate can't be used with those operating systems. What it means is that we have to fall back on a more basic method of setting an environment variable. This involves creating a temporary batch file that sets the variable, then running and deleting the batch file.

CALL A BATCH FILE

The most basic way to put Fdate's output into an environment variable, is to:

       Fdate /Ff /At /Occyymmdd /P"@SET Fdate=" >JUNKTEMP.BAT
       call JUNKTEMP.BAT
       del  JUNKTEMP.BAT
In this example, the result will be that the Fdate environment variable is set to today's date, in ccyymmdd format.

You might also want to investigate a utility called XSET. see TOPIC Xset - A Utility For Creating Environment Variables Under NT, Win2k, XP