Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
i need a batch script to run on the 15th of every mounth at logon [in windows 98]. what syntax do i use to have it run on a certin date? ANY HELP WOULD BE GREATLY APPRECIATED

Well there is no way that I know of to get the time from a batch file. However, if you envtime.exe from my site You can put these lines in a batch file to accomplish what you want to do:
@ECHO OFF
ENVTIME.EXE > %TEMP%\TIME.BAT
%TEMP%\TIME.BAT
IF "DOM"=="15" GOTO RUN
GOTO EXIT
:RUN
WHATEVER_PROGRAM.EXE
ANOTHER_PROGRAM.EXE:EXIT
--------------------
You should put envtime.exe in your c:\Windows folder so that you won't need to type the full path to the program each time you run it. To make it run at windows startup, copy the batch file to your:
c:\windows\start menu\program\startup
folder. Email me if you have any questions.

Sorry about that last one, html typpo screwed everything up.
===========================
Well there is no way that I know of to get the time from a batch file. However, if you download the file envtime.exe from my site You can put these lines in a batch file to accomplish what you want to do:@ECHO OFF
ENVTIME.EXE > %TEMP%\TIME.BAT
%TEMP%\TIME.BAT
IF "DOM"=="15" GOTO RUN
GOTO EXIT
:RUN
WHATEVER_PROGRAM.EXE
ANOTHER_PROGRAM.EXE:EXIT
--------------------
You should put envtime.exe in your c:\Windows folder so that you won't need to type the full path to the program each time you run it. To make it run at windows startup, copy the batch file to your:
c:\windows\start menu\program\startup
folder. Email me if you have any questions.

Hi
May be this batch-file will help:
@echo off
cls
if "%1"=="" goto helpset run_date=%1
set date_file=run_date.tmprem write todays date to temp file
date/t > run_date.tmpfind "%run_date%" %date_file% > nul
if errorlevel 0 if not errorlevel 1 goto run_prog
if errorlevel 1 if not errorlevel 2 goto exit
goto exit:help
echo Syntax: RUN_DATE DATE
echo DATE should be: DD.MM
goto exit:run_prog
echo -Running my program-
ver
goto exit:exit
if exist %date_file% del %date_file%
Send me an e-mail if any questions.

Hi
The date/t is for Windows NT.
If you are using som other os, tyr:
date < enter.bat > %date_file%
and make the file enter.bat with just a carriage return in.

Hi, I need to run a script that will automatically log a user into a file server,
backup, Example:My Documents and all of it's
file contents, and then automatically log
them out. I am running NT Server 4.0 and
Netware 5.1 for workstations i have Windows
95/98. Is there a solution.
Your help would greatly appreciated.
Thanks
Bill Dunn.

![]() |
![]() |
![]() |

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