GetExtension

Gets the extension of a file.
1,1K download
Aggiornato 10 lug 2007

Nessuna licenza

Gets the extension of a filename. The extension is assumed to be the last dot of the filename and all characters following the last dot. If there is no dot, then FileExtension is empty.

This code seems useful when you allow the user to select a file (eg. using uigetfile), and you want to do different things based on the extension of the file the user has chosen. You could do this with the index options of uigetfile, but this gives a way for the user to see all files in a directory, and still determine the type of file that was chosen.

Cita come

John McArthur (2024). GetExtension (https://www.mathworks.com/matlabcentral/fileexchange/15537-getextension), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2007a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su File Operations in Help Center e MATLAB Answers
Riconoscimenti

Ispirato da: findfiles

Community Treasure Hunt

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

Start Hunting!
Versione Pubblicato Note della release
1.0.0.0