|
Answer» Many many thanks for giving answers to my questions. From the directions given by the forum , VIZ RE < SEE also %cd% %date% %time% %random% %errorlevel% %cmdextversion% and %cmdcmdline% >, I eagerly request the forum to give simple examples withe the formats INCLUDING <%cd% %date% %time% %random% %errorlevel% %cmdextversion% and %cmdcmdline% > sothat I can use them in my applications. Again thanking the forum and expecting response,I REMAIN < spdCHF>.type set/? at command prompt
Code: [Select]If Command Extensions are enabled, then there are several dynamic environment variables that can be expanded but which don't show up in the list of variables displayed by SET. These variable values are computed dynamically each time the value of the variable is expanded. If the user explicitly defines a variable with one of these names, then that definition will override the dynamic one described below:
%CD% - expands to the current directory string.
%DATE% - expands to current date using same format as DATE command.
%TIME% - expands to current time using same format as TIME command.
%RANDOM% - expands to a random decimal number between 0 and 32767.
%ERRORLEVEL% - expands to the current ERRORLEVEL value
%CMDEXTVERSION% - expands to the current Command Processor Extensions version number.
%CMDCMDLINE% - expands to the original command line that invoked the Command Processor.
Code: [Select]C:\>for %a in (cd date time random errorlevel cmdextversion cmdcmdline) do call echo %a=%%a% cd=C:\ date=25/03/2009 time=11:44:06,93 random=8050 errorlevel=0 cmdextversion=2 cmdcmdline="C:\WINDOWS\system32\cmd.exe"
|