for /f "delims=. tokens=3" %I in ("1.2.3.4") do echo %I