"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!