Zend certified PHP/Magento developer

Watch when specific file is modified and run (batch) script

I wrote a batch script

@echo off
copy foobar.log file.log /Y
setlocal enabledelayedexpansion
for /f tokens^=2^ delims^=^" %%a in (file.log) do (
  set "lastLine=%%~na"
  )
echo %lastLine%>currentsong.txt
endlocal
goto eof

that I would like to run whenever ‘foobar.log’ is modified, how would I go about doing so, I have searched online to no avail. I would prefer for it to be in a built in windows utility (ie. batch or powershell script). Any help is appreciated.