Here is the command that should complete the task:
for /f "tokens=2" %s in ('sc query state^= all ^| find "SERVICE_NAME"') do
@(for /f "tokens=4" %t in ('sc query %s ^| find "STATE "') do @echo %s is %t)
How it works:
The first is executed sc query state= all | find "SERVICE_NAME". This command is designed to provide you with service names, one per line. The carriages ^(which I deleted here) are needed to avoid special characters that you want to affect the command sc, not the command for.
for /f , SERVICE_NAME: , . :
C:\>for /f "tokens=2" %s in ('sc query state^= all ^| find "SERVICE_NAME"') do @echo %s
AdobeFlashPlayerUpdateSvc
AeLookupSvc
ALG
AppIDSvc
Appinfo
AppMgmt
aspnet_state
AudioEndpointBuilder
AudioSrv
for /f, sc query servicename, "" ( ).
, ( - , ).
:. , (, %s) .