How can I add an extension to all files in a folder?
1 次查看(过去 30 天)
显示 更早的评论
How can I add an extension to all files in a folder?
The current filetype is simply "File"
For every IM001 to IM195 file, I want to add the extension .nii
I have several hundred to several thousands of "files" in each folder, and this is just one folder.
Is there a script I can try using to do this?
Thanks!!
0 个评论
回答(1 个)
Cris LaPierre
2021-1-5
编辑:Cris LaPierre
2021-1-5
4 个评论
Stephen23
2021-1-5
@Cris LaPierre: surely the overloaded string plus operation does not require the superfluous square brackets?
Cris LaPierre
2021-1-5
True, it doesn't. I'd intilially written it without the plus and using single quotes, which does, but then saw the user has R2020a so switched to plus and double quotes. Just overlooked removing the square brackets.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 File Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!