Discussion Locked
0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How can I use the current (system)date as a variable in a NT shell script?
1 reply
Hi,
There is no direct access to the date from an NT shell script, but you can access it by doing something like...
date /t > temp.txt
for /F "tokens=2*" %i in (temp.txt) do echo %i
will set the environment variable %i to the date.
Here is an example...
E:\Documents and Settings\Tim Medhurst>date /t > temp.txt
E:\Documents and Settings\Tim Medhurst>for /F "tokens=2*" %i in (temp.txt) do echo %i
E:\Documents and Settings\Tim Medhurst>echo 01/04/2002
01/04/2002
E:\Documents and Settings\Tim Medhurst>
Cheers,
Tim.
This discussion is closed to new replies.
Trending Windows Forum posts
Sort by Trending
2 helpful
26 replies
0 helpful
1 reply
0 helpful
3 replies
Discussion
Do you think that business directories are relevant to Local SEO And Lead Generation today
0 helpful
16 replies
0 helpful
6 replies