Avoid file overwrite

版本 1.0.0.0 (3.0 KB) 作者: Simon Musall
Function to check if a file name already exists and create a new unique name by enumeration.
321.0 次下载
更新时间 2016/11/12

查看许可证

编者注: This file was selected as MATLAB Central Pick of the Week

Function to check if a given file already exists. If a matching file is found, it creates a new filename that can be used to avoid overwriting. New file names are created by appending a sequence like '_001' to the file name. If earlier numerations exist already, the next unused number is used to allow saving file sequences, based on the same initial name. The starting value of the enumeration and the number of used digits are adjustable if needed.

引用格式

Simon Musall (2024). Avoid file overwrite (https://www.mathworks.com/matlabcentral/fileexchange/60179-avoid-file-overwrite), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2014a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 File Name Construction 的更多信息

Community Treasure Hunt

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

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

Changed title
Added picture and usage example.
Added correct picture