You are not logged in.
Pages: 1
hi there,
A friend just showed me this handy use of tokens which I didn't know existed: sequential letter variables are automatically created for each item in the list:
for /f "tokens=1-4 delims=/ " %%a in ('date /t') do (
set dow=%%a
set mm=%%b
set dd=%%c
set yy=%%d
)
echo Named Day: %%a
echo Month: %%b
echo Day: %%c
echo Year: %%d
This would be useful info to add to http://ss64.com/nt/for_cmd.html
though a better example needs to be created, as this one will give varying results depending on the local systems default date format setup.
cheers,
-matt
Offline
See this page for a similar example
Offline
Pages: 1