def get_file_split_dir_index(file_index: int, num_split_dirs: int, num_files: int) -> int:
    """
    Get the split directory index where a specific file should be placed.

    :param file_index: File index - 1,2..,num_files
    :param num_split_dirs: Number of split directories.
    :param num_files: Number of files.
    :return: Split directory index.
    """

    num_files_p_split = num_files // num_split_dirs
    return (file_index - 1) // num_files_p_split + 1 if file_index <= num_files_p_split * num_split_dirs else num_split_dirs