def filename_from_path(full_path):
    """
    given file path, returns file name (with .xxx ending)
    """
    for i in range(len(full_path)):
        j = len(full_path) - 1 - i
        if full_path[j] == "/" or full_path[j] == "\\":
            return full_path[(j + 1):]