"delete" does not find a file?
이전 댓글 표시
Why wouldn't this work:
if isfile(filename)
delete filename
end
filename is a char vector.
File is not deleted, and I get a warning: Warning: File 'filename' not found.
How could it be not found if isfile returned true? Am I doing some beginer mistake?
댓글 수: 2
Stephen23
2020년 5월 13일
"Why wouldn't this work: "
Because you are using outdated, misleading, sadly overused command syntax.
Use function syntax instead.
Danijel Domazet
2020년 5월 13일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 File Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!