Donald Trump hinted that the threatened countermeasure might hit one of France's export crown jewels.

US President Donald Trump on Friday vowed "substantial" retaliation against France for a tax hitting US tech giants, accusing his counterpart Emmanuel Macron of "foolishness" and issuing a veiled threat to impose tariffs on French wine.

"France just put a digital tax on our great American technology companies," Trump tweeted about the law, which is set to affect US giants Google, Apple, Facebook and Amazon.

"If anybody taxes them, it should be their home Country, the USA," he added. "We will announce a substantial reciprocal action on Macron's foolishness shortly."

Trump hinted that the threatened countermeasure might hit one of France's export crown jewels -- wine.

"I've always said American wine is better than French wine!" the teetotal president said.

Deputy White House spokesman Judd Deere said Washington was "extremely disappointed by France's decision to adopt a digital services tax at the expense of US companies and workers."

"The Trump administration has consistently stated that it will not sit idly by and tolerate discrimination against US-based firms," he said in a statement.

In addition to a probe already opened by the US government against France, "the administration is looking closely at all other policy tools."

Trump has generally got along well with Macron, avoiding some of the more stormy episodes marring traditionally stable relations with other close US allies in Europe and Asia.

But his drive to correct what he sees as unfair trade practices by allies and rivals alike has stirred unprecedented discord.

And this is not the first time that he has mused about taking aim at France's renowned wine industry.

In June, he told CNBC television that domestic wine makers had complained to him about the difficulties of entering the European market.

"You know what? It's not fair. We'll do something about it," he said.

The current row is linked to a law passed by the French parliament this month on taxing digital companies for income even if their headquarters are elsewhere. This would aim directly at US-based global giants like Amazon.

Britain has announced plans for a similar tax.