Custom processing for epoch weighting

Hello, my apologies for bringing up an old topic but I have a question regarding this post.

Right now this process has been working very nicely without any issues. The screenshot below demonstrates what happens when you input 10 epochs into this process. The process outputs 10 epochs all labelled WEpoch (which stands for weighted epoch).

How would I amend the code down below so that each output file now has the Nth number of file attached to it as a tag? I.e. "WEpoch (#1)", "WEpoch (#2)" and etc.

image

% ===== SAVE THE RESULTS =====
    % Get the output study (Epoch weighting)
    iStudy = sInputs(i).iStudy;
    % Create a new data file structure
    DataMat             = db_template('datamat');
    DataMat.F           = WEpoch;
    DataMat.Comment     = sprintf('WEpoch'); % Names the output file as 'WEpoch'.
    DataMat.ChannelFlag = ones(epochSize(1), 1);   % List of good/bad channels (1=good, -1=bad)
    DataMat.Time        = Time;
    DataMat.DataType    = 'recordings';
    DataMat.nAvg        = length(sInputs);         % Number of epochs that were averaged to get this file
    % Create a default output filename 
    OutputFiles{i} = bst_process('GetNewFilename', fileparts(sInputs(i).FileName), 'data_WEpoch');
    % Save on disk
    save(OutputFiles{i}, '-struct', 'DataMat');
    % Register in database and group them into a trial group node
    db_reload_studies(iStudy);