Thank you.
I ended up working through it prior to seeing your post, and I have successfully tested this:
@echo off
:loop
REM set variable to flag file mod date in sys format
for /f "tokens=1,2" %%i in (C:\Admin\flag.txt) do (
set dt=%%j
)
REM Create variable from sys date parsed to just mm/dd/yyyy
for /f "tokens=1,2" %%i in ("%date%") do set sysdt=%%j
REM compare flag mod date to sys date
IF %dt% EQU %sysdt% GOTO indexer
REM ECHO Not Equal
REM dates not same so wait 10 minutes and try again
ping -n 601 localhost > nul
GOTO loop
:indexer
REM ECHO equal
REM dates same so close Indexer
CALL C:\Admin\EndIndex.bat
REM wait for fileserver to come back up
ping -n 901 localhost > nul
REM start Indexer again
CALL C:\Admin\StartIndex.bat
EXIT
Thanks to everyone for all your help!!!!
Now, I just have to wait for an update initiated reboot to see if the script that writes to the flag file will run even with 3rd party initiated reboots. If not, I'll be back to find out more about the suggestion to listen for the reboot event.