"delete" does not find a file?
Ältere Kommentare anzeigen
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 Kommentare
Stephen23
am 13 Mai 2020
"Why wouldn't this work: "
Because you are using outdated, misleading, sadly overused command syntax.
Use function syntax instead.
Danijel Domazet
am 13 Mai 2020
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu File Operations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!