2 of 2 edited tags

Identify this short story: Malfunctioning robot destroys anything that moves, man is injured by robot, shines light on robot

Ok, I need your help. When I was young, I was reading some random book of short stories. I think the book was from 1960's. I can't remember the book name or the stories name.

But the story was pretty much this: A guy walks into a room of some sort and immediately gets attacked by a crazed robot. The guy gets knocked behind a table or something and is trying to figure out what is going on. But then he notices that the clock on the wall is smashed. Computers are smashed. He figures out that the robot has malfunctioned and destroys anything that moves.

The guy is wounded badly so can't outrun robot. He manages to find a flashlight amongst the clutter and shines the flashlight on the robots chest. The robot sees the movement of the light on its chest and starts smashing at it, eventually destroying itself.

That's the gist of what I can remember. Does anyone have an idea of the name of this story or collection?! Thank you!!