replace directory