Sunday, March 30, 2014

[MATLAB] mkdir if not exist

If you want to avoid following warning message,
 'Warning: Directory already exists.'

or if you want to create directory only if the directory does not exist...



if ~exist('folder_name', 'dir')
    mkdir('folder_name');
end

No comments:

Post a Comment