riched remove folder function