How to delete text files except one.?
Afficher commentaires plus anciens
In one folder there are so many text files. I want to delete all that files except one named XYZ.txt using matlab.
delete(*.txt)
This function deletes all. So, how to do.?
2 commentaires
José-Luis
le 16 Fév 2013
- Copy that file somewere else ( copyfile() ), delete, copy back.
- Get list of all files ( dir() ), delete xyz from list, delete all files in list
Lalit Patil
le 16 Fév 2013
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur File Operations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!