RouteFinder

RouteFinder is a short python scripts which allows easy navigation through a computer's local file system. It requires use of the command line interface for use; I use it in conjunction with iTerm2, an emulator for the macOS terminal.

RouteFinder

The program has two written functions, RouteFinder and filesearch. The former is incorporated into the latter, making it a necessary import, even though filesearch can handle the job of RouteFinder. The script uses the Path function from the pathlib module to return all subdirectories from a current directory, then recursively returns all further subdirectories (“sub-subdirectories”) until the whole filesystem is explored. It then uses string manipulation to search for the filename in the user input in each path, locating the correct one and returning it to the user.

RouteFinder

This method allows the user to navigate through any path in their file system using just one line, including the file start location and the filename of the desired destination. Simply save the RouteFinder py script in the top-most directory, open a python terminal tab in the directory and import the functions, then open a second tab in bash for navigation. The RouteFinder function itself can be used to find a specific path from the top-most directory, through note the initial file location should be given by “.”. Furthermore, all filenames should be string inputs and thus surrounded by quotes.

RouteFinder


Click the image below to download RouteFinder:


Download RouteFinder

Last updated: 15/08/2020

RouteFinder RouteFinder RouteFinder RouteFinder