Delete documents before strarting the routine

12 ビュー (過去 30 日間)
Javier Martinez
Javier Martinez 2017 年 3 月 13 日
コメント済み: Jan 2017 年 3 月 16 日
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 件のコメント
Javier Martinez
Javier Martinez 2017 年 3 月 16 日
It worked ! Nice thank you very much.
Jan
Jan 2017 年 3 月 16 日
You are welcome!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeConstruct 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