Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
DOS command to check current date?
Name: Trace Date: January 25, 2000 at 18:58:37 Pacific
Comment:
All:
I need to execute a few DOS commands (via a bat file which runs each time the computer is booted) but only on a certain date.
Does anyone know the "IF (certain date) THEN (do this, that, the other)" DOS command(s)?
Name: Mick C Date: January 26, 2000 at 10:31:39 Pacific
Reply:
I have 2 applications that may be of help to you.
1. MS-DOS 5.0 Command Referance
2. MS-DOS 6 Resource Kit
Both can be downloaded from my Resource site:
http://www.powerload.fsnet.co.uk
Or click on the link at top of this message.
0
Response Number 2
Name: Trace Date: January 28, 2000 at 12:34:30 Pacific
Reply:
Thanks for that reference. I did check out that site - it is very useful. While those materials do cover many DOS commands, none of them appear to refer to referencing the current date for conditional operations. The "IF NOT EXIST" item does check for the existence of a particular file name, but nothing is mentioned about referencing the current date.
This seems like it would be a relatively common need for programmers. Possbibly I've missed something in the documentation.
Summary: Could someone help me - I need a DOS batch file to check 4 files in a directory which are = today's date. If one or any of the files are not (older than 1 day) than call another batch file that I've c...
Summary: can someone help me i need a dos batch file to check 2 files timestamps are = today date. if one file is not than call another batchfile. thanx ...
Summary: Mani and I changed a couple of emails, and the solutions to get current date into a variable for further use was: set date2=%date:~4,2%%date:~7,2%%date:~10,4% Mani is using Windows 2000. This solution...