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

Added a function that can remove temporary files

parent 5cec25c6
No related branches found
No related tags found
No related merge requests found
function [] = RemoveTemporaryFiles(ignoreWarning)
if nargin<1, ignoreWarning=0; end
files = dir('./**/*tmp*.mat');
if ~ignoreWarning
disp('The following files will be deleted: ')
for i = 1:length(files)
disp([files(i).folder '/' files(i).name])
end
doRemove = input('Do you want to delete them? 1 = delete, 0 = save. Choice: ');
else
doRemove = 1;
end
if doRemove
for i = 1:length(files)
delete([files(i).folder '/' files(i).name])
end
end
end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment