Computing.Net > Forums > Disk Operating System > DOS batch time parameter

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

Reply to Message Icon

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



Sponsored Link
Ads by Google

Response Number 1
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.)


0

Response Number 2
Name: DrScriptt (Grant)
Date: January 15, 2001 at 21:17:27 Pacific
Reply:

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.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: DOS batch time parameter

HELP ME WITH DOS BATCH FILES LINES PLEASE www.computing.net/answers/dos/help-me-with-dos-batch-files-lines-please/2496.html

Dos Batch time/date text file www.computing.net/answers/dos/dos-batch-timedate-text-file/12334.html

Dos Batch time/date text file www.computing.net/answers/dos/dos-batch-timedate-text-file/12403.html