Avoid file overwrite

バージョン 1.0.0.0 (3.02 KB) 作成者: Simon Musall
Function to check if a file name already exists and create a new unique name by enumeration.
ダウンロード: 355
更新 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 (2026). Avoid file overwrite (https://jp.mathworks.com/matlabcentral/fileexchange/60179-avoid-file-overwrite), MATLAB Central File Exchange. 取得日: .

MATLAB リリースの互換性
作成: R2014a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersFilename Construction についてさらに検索
バージョン 公開済み リリース ノート
1.0.0.0

Changed title
Added picture and usage example.
Added correct picture