def is_excluded_folder(dirpath, excluded_folders):
    """ Check if one element of excluded_folders is in the current
        dirpath to determine if the folder has to be excluded

    Arguments:
        dirpath {string} -- the current dirpath
        excluded_folders {list} -- list of folders to exclude

    Returns:
        True -- if the filename contains one or more elements on excluded_files
        False -- if otherwise
    """
    for folder in excluded_folders:
        return folder.rstrip("\\/") in dirpath