Automate Recognizing Working Directory