auto-directory setting