Check if a file has been changed

February 26, 2011 at 01:04:56
Specs: Windows XP
Hi All,

I'd like from within a master batch file to call another batch file only if a specific file has been changed from the last time I run the master batch file.

How could I achieve that?

Thanks in advance.

See More: Check if a file has been changed

Report •

February 26, 2011 at 03:59:37
:: ==========================================
:: drizop.bat Sat 26-02-2011 18:41:30.99
@echo off & setLocal enableDELAYedeXpansion

if not exist filename.# copy filename.ext filename.# && echo 1st run && goto :eof
fc filename.# filename.ext > nul
if errorlevel 1 (
call myother.bat
copy filename.ext filename.# > nul
) else (
echo no change

Life is too important to be taken seriously.


Report •
Related Solutions

Ask Question