answer for SO question on deldir