%% Percentage of Files Read
% Determine the percentage of files that have been read from the file-set.
% Create a file-set fs for a collection of files.

folder = {'accidents.mat','airlineResults.mat','census.mat','earth.mat'}
fs = matlab.io.datastore.FileSet(folder)

% Get the information for the first file and move the internal pointer forward one file.

file1 = nextfile(fs)

% Use the progress function to see the percentage of files that have been read from the file-set.

p = progress(fs)

% Copyright 2019 The MathWorks, Inc.