Skip to content
Snippets Groups Projects
Commit 5cec25c6 authored by William Lövfors's avatar William Lövfors
Browse files

added a function that can remove all mex files in the current and subfolders.

parent ce173777
Branches
No related tags found
No related merge requests found
function [] = RemoveAllMEXFiles(ignoreWarning)
% Removes all mexfiles in current folder and all subfolders
files = dir('./**/*.mex*');
if nargin <1 || ~ignoreWarning
disp('WARNING!!!!')
disp('This will delete ALL files that contains "mex". ')
disp('This could potentially remove files from necessary toolboxes.')
disp('The following files will be deleted:')
for n = 1:length(files)
disp([files(n).folder '/' files(n).name])
end
choice = input('Do you want to continue? \n(y/n) ','s');
end
if (nargin==1 && ignoreWarning) || strcmp(choice,'y')
clear mex
for n = 1:length(files)
delete([files(n).folder '/' files(n).name])
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment