Avoid file overwrite

Function to check if a file name already exists and create a new unique name by enumeration.

309 descargas

Actualizado 12 Nov 2016

Ver licencia

Nota del editor: 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.

Citar como

Simon Musall (2023). Avoid file overwrite (https://www.mathworks.com/matlabcentral/fileexchange/60179-avoid-file-overwrite), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2014a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Más información sobre File Name Construction en Help Center y MATLAB Answers.

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión

Changed title
Added picture and usage example.
Added correct picture