—In a matrimonial action, Brandes, Weidman & Spatz, P. C. appeal (1) from an order of the Supreme Court, Nassau County (Kohn, J.), dated June 19, 1992, which, upon a memorandum decision of the same court dated March 13, 1992, denied its motion to establish a charging lien pursuant to Judiciary Law § 475 and granted the respondent’s cross motion for the return of his file and for the return of the retainer and consultation fees he had paid to the appellant to the extent of directing the appellant to pay $9,500 to the respondent, and (2) as limited by its brief, from so much of an order of the same court, also dated June 19, 1992, as upon reargument, adhered to the original determination.
Ordered that the appeal from the order dated June 19, 1992, which granted the defendant’s cross motion to the extent of directing the appellant to pay $9,500 to the defendant is dismissed, as that order was superseded by the order dated June 19, 1992, made upon reargument; and it is further,
Ordered that the order dated June 19, 1992, made upon reargument is affirmed insofar as appealed from; and it is further,
Ordered that the respondent is awarded one bill of costs.
The respondent, George Hom, retained, the appellant law firm on or about May 26, 1989. He signed a retainer agreement which provided that he, as the appellant’s client, agreed to pay $15,000, which was "not to be returned to the client, in whole or in part, under any circumstances”. Hom paid the consultation fee of $500 and the retainer fee of $15,000. On or *297about July 15, 1991, Horn discharged the appellant from his service. The appellant moved by order to show cause, pursuant to Judiciary Law §475, to fix its charging lien in the amount of $8,883.80 and to enforce it. Horn cross-moved for the return of his file and for a return of the retainer and consultation fees. After a hearing, the court found that the retainer agreement was an invalid nonrefundable retainer agreement and therefore determined the value of the firm’s services on a quantum meruit basis. The court valued the services at $6,000. The court denied the appellant’s application for the "'additional” money and granted Horn’s cross motion to the extent that the appellant was directed to refund $9,500 to Horn. Upon reargument, the court adhered to its original determination. The appellant asserts, inter alia, that its motion to secure a charging lien pursuant to Judiciary Law §475 was an in rem proceeding and therefore the court erroneously ordered it to refund $9,500 to Horn.
We find no reason to disturb the court’s determination. The fact that the court was to determine the attorney’s lien does not preclude the court from granting a refund to a former client, as long as that relief was requested (see, Cass & Sons v Stag’s Fuel Oil Co., 194 AD2d 707; Aadal v Sunchris Realty, 89 AD2d 898). The parties charted their own litigation and the court made the necessary determinations (see, Matter of Epstein & Furman, 189 AD2d 738).
Judiciary Law § 475 cannot be an umbrella under which an attorney may seek shelter from the demands of a client for the return of excessive fees paid (see, Owen v Forchelli, 42 Misc 2d 1064). It has long been recognized that courts have the traditional authority to supervise the charging of fees for professional services under the court’s inherent and statutory power to regulate the practice of law (see, Matter of Greenwald v Scheinman, 94 AD2d 842). The court also has the inherent power to compel an attorney to restore assets, moneys, or papers of the client received or retained in violation of the attorney’s professional obligations (see, Matter of Cox v Scott, 10 AD2d 32). It is also fundamental that an attorney must refund promptly any part of a fee paid in advance that has not been earned (see, Code of Professional Responsibility DR 2-106 [A] [22 NYCRR 1200.11 (a)]).
It is also well-settled that a client has the absolute right to discharge an attorney at any time. If the discharge is without cause before the completion of services, then the amount of the attorney’s compensation must be determined on a quantum meruit basis (see, Theroux v Theroux, 145 AD2d 625). *298”[W]here a client requests that papers in the possession of his former attorney be returned to him, and the attorney asserts a claim for compensation for services rendered, the attorney is entitled to a determination fixing the value of his services, and the amount so fixed must be paid or otherwise secured to the attorney before any such turnover may be enforced” (Rosen v Rosen, 97 AD2d 837). Whether the fee so fixed shall be presently payable or secured by a lien on the cause of action rests in the sound discretion of the trial court (see, Shelbourne Garage v Licht, 34 AD2d 563).
Here, the appellant moved the court to fix its charging lien, pursuant to Judiciary Law § 475, at $8,883.80. This amount was in excess of the $15,000 norirefundable retainer already paid by Hom. Hom cross-moved , for the return of his retainer fee and his files. The court properly found the nonrefundable retainer fee was invalid (see, Matter of Cooperman, 83 NY2d 465), and determined the reasonable value of the appellant’s services to be $6,000 and ordered a refund of $9,000 plus the $500 consultation fee. Ritter, J. P., Santucci, Friedmann and Goldstein, JJ., concur.