Avoid file overwrite

Function to check if a file name already exists and create a new unique name by enumeration.
323 téléchargements
Mise à jour 12 nov. 2016

Afficher la licence

Note de l’éditeur : 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.

Citation pour cette source

Simon Musall (2024). Avoid file overwrite (https://www.mathworks.com/matlabcentral/fileexchange/60179-avoid-file-overwrite), MATLAB Central File Exchange. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2014a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur File Name Construction dans Help Center et MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Publié le Notes de version
1.0.0.0

Changed title
Added picture and usage example.
Added correct picture