Clad in the classic khakis and polo shirt worn by engineers across Silicon Valley, the 42-year-old transient blended in so well with tech workers that he was able to slip through the door of nine local companies and steal employees’ wallets.

Doanh Dinh Tran, 42, would then rush to Apple or Target, and quickly buy laptops and iPads with the victims’ credit cards before they had time to cancel them, Santa Clara prosecutor Jennifer Deng said Thursday. Over a four-month period ending in August, he was able to steal more than $10,000, she said.

Although the booty was relatively small, especially for Silicon Valley, Superior Court Judge Daniel Nishigaya sentenced him Thursday to seven years in prison for second-degree burglary and identity theft.

“ID theft is a serious crime,” Deng said. “We are pleased that he is being held accountable.”

Tran’s criminal record also was a factor in his sentence. He had done two stints in prison for the same crime, Deng said. She didn’t know if he targeted any of the same companies, she said.

The case was handled by REACT, a task force of law enforcement officials from around the area who focus on high-tech crimes and identity theft.

Tran purposely targeted Silicon Valley, coming here periodically from Texas, Deng said. She described him as a transient who was somehow able to clean himself well enough to simply walk into a company behind other workers.

But he didn’t factor in the companies’ surveillance systems, which caught him on video. Sunnyvale police discovered his identity because they’d investigated similar crimes he’d apparently committed in 2005 and 2008.

Tran was arrested in Arizona and extradited to Santa Clara County.

Contact Tracey Kaplan at 408-278-3482. Follow her at Twitter.com @tkaplanreport.