Home Support FAQ Software  
Site Map
Search


FAQ for Now v1.03    Now

Question  Can I get the output from NOW into an Environment Variable?

Yes, you can get the output from NOW into the environment for use within batch file or system settings. Here is a small example batch file that will work on Windows NT, 2000, 2003, XP, Vista and 2008.

@echo off

rem *** Get the date and stash it in Date.txt
now yyyy-mm-dd > date.txt

rem *** Walk through and store it in the variable %date%
FOR /F " tokens=1 " %%i in (date.txt) do set date=%%i


At this point you can use the %date% variable fom the Environment to do whatever you want! Pretty cool, eh?

Back to the questions for Now
 
Download more software like Now. Search the FAQ for your answer.

Rating: Top Rated!Top Rated!Top Rated!Top Rated!Top Rated! (16 votes) Rate this answer Rate this answer

Additional Information Additional Information Printer Friendly Printer Friendly
Views: 10,097 Add to Favorites Add to Favorites
Added: Jan 20, 2005
Last Updated: Dec 31, 2007