필터 지우기
필터 지우기

need to delete all mat files from all the folders at the end of execution.

조회 수: 1 (최근 30일)
Hi, How can I delete all mat file at the end of execution For example my program consists as follows
Function mfile
statement...
function one
DataPath = [pwd '\01_data\001_data\'];
statement...
end
function two
DataPath = [pwd '\02_Data\'];
statement...
end
function three
DataPath = [pwd '\03_Data' '\'];
statement...
end
function four
DataPath = [pwd '\04_Data\'];
statement...
end
function five
statement...
end
end
  • cán anyone help me how to solve this
  댓글 수: 1
Adam
Adam 2018년 9월 24일
Keep track of all the paths and then delete them using
doc delete
It isn't obvious from the code you post what setup you actually have. You just show a bunch of independent functions with no indication how they are called or if they return any arguments. If they don't then they should probably return the DataPath they use to enable you to keep track of it.

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2018년 9월 24일
You should consider using onCleanup()

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by