In an action affecting the title to real property the plaintiff (a) not more than twenty days before filing the complaint or at any time afterwards or (b) whenever a warrant of attachment under Sections 15-19-10 to 15-19-560 shall be issued or at any time afterwards or a defendant when he sets up an affirmative cause of action in his answer and demands substantive relief, at the time of filing his answer or at any time afterwards if such answer be intended to affect real estate, may file with the clerk of each county in which the property is situated a notice of the pendency of the action, containing the names of the parties, the object of the action and the description of the property in that county affected thereby. If the action be for the foreclosure of a mortgage such notice must be filed twenty days before judgment and must contain the date of the mortgage, the parties thereto and the time and place of recording such mortgage.
S.C. Code § 15-11-10