cleardir

版本 2.0.0 (1.6 KB) 作者: Ajay Kumar
Delete only the contents of a folder
12.0 次下载
更新时间 2023/12/8

查看许可证

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.

引用格式

Ajay Kumar (2024). cleardir (https://www.mathworks.com/matlabcentral/fileexchange/155507-cleardir), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2023b
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
2.0.0

- Bug fixes (latent bugs highlighted in Stephen23 review)
- Minor code improvements (suggestions from Stephen23's review)
- Up to date comments
Shout out to Stephen23 for his detailed helpful review!

1.0.0