Recreate directory with rules