Solved If date == or than in DOS

August 5, 2011 at 06:55:38
Specs: Windows 7
Hello Dos community. Can you help me with this?

I think it's simple to do, but I can't figure it out.

I have a batch file that can check to see if the date is a certain day. For example,

if "%date%"=="Fri 10/28/2011" echo %date%

I need it to check to see if it's "Fri 10/28/2011" or any day after, so something like...

if "%date%"== or >"Fri 10/28/2011" echo %date%


See More: If date == or than in DOS

Report •

August 5, 2011 at 08:34:27
✔ Best Answer
I think it's simple to do
It's not.

In actual DOS the OS you booted into, (not the Command Prompt, which you're probably referring to), you had to use a third party program. DOS came with a debugger you could use to write this program yourself.

The 32-bit versions of Windows (with Command Prompt) have a 16-bit support layer you could use, so you might still be able to do that.

The 64-bit versions (with Command Prompt) however eschew this 16-bit support layer (because we really need to move past the 1980's).

I would suggest picking up a script language with proper date support, such as VBScript or PowerShell.

How To Ask Questions The Smart Way

Report •

August 5, 2011 at 13:12:03
Since this was for a Windows 7 machine, I decided to try and use Task Scheduler, and it ended up working extremely well for what I wanted. Thanks.

Report •

Related Solutions

Ask Question