New York’s top cop knows “that smell,” and he’s not having it on Wall Street — even if it is just a girl enjoying a joint on her way to class.

NYPD Commissioner Bill Bratton sniffed some weed in the air as he walked the financial stretch on Thursday morning, and he swung into action.

Bratton and one of his security officers scoped out the college-aged culprit, approached her and removed the joint from her mouth.

Then they tossed it down a sewer.

“Directly in front of us is this young woman, happily puffing away, on her way – with her earphones in and [with] her school bag — to one of the local schools,” recalled Bratton at a New York Law School breakfast on Friday.

“All of a sudden, there it is, that smell,” he said. I thought, “What the hell —8:30 on Wall Street?”

“So my security officer came up on one side, I came up on the other and tapped her on the shoulder,” he said. “I wish I had a photograph of that face. She instantly recognized me.”

The commissioner-turned-narc “politely” took the weed. Then he “suggested” to the stunned woman “that she might have a better academic day without the influence of [pot],” he said.

Bratton could have arrested and booked the woman for misdemeanor drug possession, because the joint – even though a small amount — was lit. Last year, the NYPD – following several other U.S. cities in recent years – announced it would stop arresting those nabbed with 25 grams or less of weed. City cops now hand out a summons and fine instead.

But smoking in public is an exception to the no-arrest rule.

But Bratton, as he addressed the law students, defended the free pass he gave to the joint-toting woman.

“If you’re smoking it in public we will potentially arrest you,” he said, “but we encourage officers to use the scale they are authorized to use — warning, admonitions, summons, arrest if necessary.”

Then he summed up the Wall Street encounter with: “What is that Cindy Adams says? Only in New York, kids.”