GetExtension

版本 1.0.0.0 (602 字节) 作者: John McArthur
Gets the extension of a file.
1.1K 次下载
更新时间 2007/7/10

无许可证

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.

引用格式

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

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

参考作品: findfiles

Community Treasure Hunt

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

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