Cool Solutions



April 6, 2005 4:30 pm






Download runifnewer

By Bryan Keadle

Sometimes, I want to run a program only if the program (or it’s data file) has changed since the last time it was run. RunIfNewer allows me to run a program based on whether it, or some specified file, has changed.

For example, we download the latest virus definitions (an .EXE posted) to the network, and our workstation administration batch file as part of our login script will execute this definitions update whenever it is newer than the last time it was run on the workstation:


Another example, we can easily distribute a group of files/directories to workstations upon login whenever we update the source ZIP file:

RUNIFNEWER WS QUIET FILE=F:\PUBLIC\WSFILES.ZIP / pkzip32-extract=update -overwrite=all F:\PUBLIC\WSFILES.ZIP C:\


Checks if (Program Name) has newer date/time stamp, unless FILE= is specified, in which case, it checks the date/time stamp of the specified file, and runs (Program name) if IT is newer. This accomodates a data file changing date/time instead of the executable.

“/” is required to delimit between RUNIFNEWER options and the Program and parameters entry

If (Program Name) has a newer file date/time than the last time it was run, run it, otherwise skip it.
This program is intended for administration-type programs, like batch files, that need to be distributed/run only when changes are made/added.

Option Defaults are:

HKLM registry flag (WS)
WAIT for program to finish before continuing
Run in Normal Window
with BoxText info (not QUIET)

Hold down SHIFT key to view/manage the Registry flag entries.

0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.

Categories: Uncategorized

Disclaimer: This content is not supported by Micro Focus. It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test it thoroughly before using it in a production environment.