%% Find Information in the Return Structure
% Return the folder listing of myfolder to the variable MyFolderInfo.
% Create a folder, myfolder, that contains the files myfile1.m,  myfile2.m, and myfile3.m.

mkdir myfolder
movefile myfile1.m myfolder
movefile myfile2.m myfolder
movefile myfile3.m myfolder

%
% Get a list of the files in myfolder. MATLAB returns the information in a structure array.

MyFolderInfo = dir('myfolder')

%
% Index into the structure to access a particular item.

MyFolderInfo(3).name

%
% Copyright 2012 The MathWorks, Inc.