RJL Software
Home to RJL SoftwareWindows SoftwareTechnical Support
Home Support FAQ Software  
Money Help Fund
Search

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?

Do you like Now?

Get Help

Didn't find your answer?

Our support team can help you with your specific issue. Submit a request and we'll get back to you.

Get Help Now
Rating: Top Rated!Top Rated!Top Rated!Top Rated!Top Rated! (16 votes)
Rate this answer:
Additional Information
Added: Jan 20, 2005   |   Last Updated: Dec 31, 2007