%% Move Files to Current Folder
% Move files and folders to the current folder by omitting the destination input.
% Create two folders: the first, myfiles, containing the file myfile1.m, and the second, myotherfiles, containing the file myfile2.m.

mkdir myfiles
movefile myfile1.m myfiles
mkdir myotherfiles
movefile myfile2.m myotherfiles

%
% Move myfile1.m to the current folder. Since a destination is not specified, MATLAB® assumes the destination is the current folder.

movefile myfiles/myfile1.m

%
% Set the current folder to myfiles. Move myotherfiles and its contents to the current folder.

cd myfiles
movefile ../myotherfiles

%
% Copyright 2012 The MathWorks, Inc.