Since delete command doesn't work on folders and rmdir deletes everything including the root folder, I have written this piece of code to remove/delete all the files and subfolders within a given folder without deleting the folder itself. Please specify the full path of the folder in order to empty it's contents.
Citation pour cette source
Ajay Kumar (2024). cleardir (https://www.mathworks.com/matlabcentral/fileexchange/155507-cleardir), MATLAB Central File Exchange. Récupéré le .
Compatibilité avec les versions de MATLAB
Créé avec
R2023b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
Version | Publié le | Notes de version | |
---|---|---|---|
2.0.0 | - Bug fixes (latent bugs highlighted in Stephen23 review)
|
||
1.0.0 |