def get_result_dir_fold(args, preprocessor):
    """
    Returns result directory of a fold.

    Parameters
    ----------
    args : Namespace
        Settings of the configuration parameters.
    preprocessor : nap.preprocessor.Preprocessor
        Object to preprocess input data.

    Returns
    -------
    str :
        Directory of the result file for the current fold.

    """

    result_dir_generic = './' + args.task + args.result_dir[1:] + args.data_set.split('.csv')[0]
    result_dir_fold = result_dir_generic + "_%d%s" % (preprocessor.iteration_cross_validation, ".csv")

    return result_dir_fold