Nearly 800 Barneys employees in New York just learned that they could lose their jobs in as little as two weeks, The Post has learned.

On the eve of a court deadline for potential buyers of the bankrupt luxury department store to submit their final offers, Barneys informed 785 employees across New York that they could lose their jobs on Nov. 1.

The layoffs would include staffers at Barneys’ two Manhattan stores, including the Madison Avenue flagship; its e-commerce unit and back-office facility in Long Island City; its Woodbury Common outlet center and its Fifth Avenue headquarters, the notice said.

Its not certain that these employees will lose their jobs, but Barneys filed a notice with the Department of Labor after licensing firm Authentic Brands Group became the stalking horse bidder last week.

If ABG wins approval to acquire Barneys for $271.4 million, it plans to liquidate Barneys’ remaining seven stores, including its Madison Avenue flagship.

The licensing firm wants to then reopen at least three stores — Madison Avenue, Beverly Hills and in Boston — but only if it can negotiate more favorable lease terms with Barneys’ landlords.

Over the weekend, ABG reached a deal with Barneys’ landlord in Boston — Simon Properties — to keep that store open, an informed source said. “The Boston store will not close at all,” he said.

Legal experts chalked up the short notice of layoffs to dashed expectations by Barneys’ brass that they could sell to a buyer who would keep the stores open, like trade show exec Sam Ben-Avraham — who has launched a “Save Barneys” campaign to boost his bid to acquire Barneys and save at least five of its stores.

“We’re still working on Sam’s business plan,” said Gary Wassner, CEO of apparel lender Hilldun Corporation. “I’d invest personally in him and his team, but we need time.”