PARIS  Many people buy a pied-à-terre in Paris to use for a few weeks a year and to rent the rest of the time. Most of them don’t realize, however, that they are breaking the law. Now, the city government is trying to address the problem with a more direct approach to enforcement.

Mayor Bertrand Delanoë ordered an agency last year to warn property owners that renting out residential apartments for less than a year at a time violated French law. The move was intended to address the lack of affordable housing in the city center. Those who ignored the warning, he said, would be prosecuted.

Only about 25 letters have been sent since enforcement began last autumn  most of them in response to complaints made by neighbors. And only a handful of those cases have gone to court.

But the rental industry in this most-visited city in the world is concerned and, as more owners slowly become aware of the issue, confusion is growing. A few have pulled their properties off the market, others have deleted addresses or other identifying details from Internet listings. And dozens of rental agencies have banded together to try to save their lucrative business.