Awesome work guys by guys in this post on this site.
But I need modifying this script according to my needs.
I am not hardcore coder but with little help I can get it working.
I have website it has timestamp in HH:MM AM/PM format.
So this is what is on my website.
Last Updated as of 11:14 pm March 11th
I would like to parse 2:14 PM
and compare it(subtract it) with current time stamp, and get the minutes. if difference is greater than 30 mins then I want it do something.
Can someone help me with this? Thanks
I am trying best to understand and modify this code.
FYI Google.com is just example, instead of google it would be link to mysite.
@echo off
setLocal EnableDelayedExpansion
set curTimestamp=%date:~7,2% %date:~3,3%_%date:~10,4%_%time:~0,2%_%time:~3,2%
FOR /F "TOKENS=*" %%A IN ('TIME/T') DO SET Now=%%A
for %%F in (q r s t u v w x y z) do if exist %%F del %%F
wget <a href="http://google.com" target="_blank" rel="nofollow">http://google.com</a>
find "Updated" < index.html > q
for /f "tokens=1-4 delims==" %%a in (q) do (
echo %%d >> r
)
for /f "tokens=2-3 delims=>" %%a in (r) do (
echo %%a %%b >> s
)
for /f "tokens=1-2 delims=<" %%a in (s) do (
echo %%a %%b >> t
)
for /f "tokens=1-2 delims=^/" %%a in (t) do (
echo %%a %%b >> u
)
for /f "tokens=1,3 delims= " %%a in (u) do (
echo %%b %%a >> v
)
for /f "tokens=1-4 delims=- " %%a in (v) do (
echo %%c %%b %%a %%d >> w
)
for /f "tokens=* delims= " %%a in (w) do (
set str=%%a
set str=!str:Jan=01!
set str=!str:Feb=02!
set str=!str:Mar=03!
set str=!str:Apr=04!
set str=!str:May=05!
set str=!str:Jun=06!
set str=!str:Jul=07!
set str=!str:Aug=08!
set str=!str:Sep=09!
set str=!str:Oct=10!
set str=!str:Nov=11!
set str=!str:Dec=12!
echo !str! >> x
)
sort < x > y
for /f "tokens=4 delims= " %%a in (y) do (
set AVG=%%a
)
echo wget www.google.com
echo %curTimestamp%
ECHO %Now%
::for %%F in (q r s t u v w x y z) do if exist %%F del %%F
Pause