Computing.Net > Forums > Disk Operating System > batch scripts I NEED HELP

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.

batch scripts I NEED HELP

Reply to Message Icon

Name: nick k
Date: December 21, 1999 at 12:38:55 Pacific
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: Ryan Cooley
Date: December 21, 1999 at 16:09:27 Pacific
Reply:

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.


0

Response Number 2
Name: Ryan Cooley
Date: December 21, 1999 at 16:10:43 Pacific
Reply:

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.


0

Response Number 3
Name: Rune Aagesen
Date: December 31, 1999 at 02:59:52 Pacific
Reply:

Hi
May be this batch-file will help:


@echo off
cls
if "%1"=="" goto help

set run_date=%1
set date_file=run_date.tmp

rem write todays date to temp file
date/t > run_date.tmp

find "%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.


0

Response Number 4
Name: Rune Aagesen
Date: January 1, 2000 at 11:12:41 Pacific
Reply:

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.


0

Response Number 5
Name: Bill Dunn
Date: July 4, 2000 at 11:39:25 Pacific
Reply:

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.


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






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: batch scripts I NEED HELP

I Need Help with the FIND Command www.computing.net/answers/dos/i-need-help-with-the-find-command/12687.html

I need help with conventional memory BADLY!!! www.computing.net/answers/dos/i-need-help-with-conventional-memory-badly/1052.html

I need help www.computing.net/answers/dos/i-need-help/5024.html