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 batch time parameter
Name: Jackie Date: January 15, 2001 at 14:17:31 Pacific
Comment:
Have a DOS batch file that runs every 30 minutes---24/7. is there a way to test for the current time? example:
rem if it is after 7:00 pm then exit if time > 19:00:00 goto finish
Name: bubbletrap Date: January 15, 2001 at 14:37:23 Pacific
Reply:
I have a utility called "Time Check" available on my website that will allow you to test for a specfic hour, via errorlevel parameters, and this could be used to do what you want. (It's a part of the Date Check Zip file, in case you wanted to try it.)
do "ECHO. | TIME > CTIME.OUT" and do a find on that for anything over 7, and wether or not it is A.M. or not. There is probably a better way of dewing this, but that is quick and dirty, and it is good practis for inexperienced batch programmers. Your batch file will be really long, and could probably be optomized gratly by haveing it call it's self, or storing flag files. Look in to third party utilities to do the time check for you, or write one your self, BASIC is great for this, interprited or compiled, it will work great.
If you need any mor ehelp email me (drscriptt@yahoo.com) and I'll do what ever I can.
Summary: I have written a DOS Batch File that executes a program several times, each time passing a different set of parameters. My problem is instead of executing the first command line and waiting until the ...
Summary: That script from reply #4 highly depends on the system's language. Such script won't work as intended on a system whose DOS is not in english. That's very bad if you're going to distribute the script....
Summary: P_hell, and anyone else whose interrested in this subject. I recently discoverd on a Windows NT workstation that adding the time and/or date to a log-file can be achieved with the following command. t...