Delete documents before strarting the routine

10 次查看(过去 30 天)
My Matlab script creates three different documents (.txt documents and .xlsx document). Every time I run the script I have to erase those documents manually in order to avoid problems. Does someone know a "script" which will go at the beginning of my routine that will delete such documents before running the analysis? Thanks.

采纳的回答

Jan
Jan 2017-3-13
Do tis for the wanted files:
if exist(FileName, 'file') == 2
delete(FileName);
end
  7 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Construct and Work with Object Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by