Removing part of file name (random numbers )
14 次查看(过去 30 天)
显示 更早的评论
Hi,
I need to remove part of fodler names that contains random numbers so I cannot really use strrep.
the files look like this "A_m_T17__75788", "A_m_T18__63071", "A_m_T19__51148" and I want to replace it with "A_m_T17","A_m_T18" ,"A_m_T19" so on and so forth.
Appreciate any help or guidance!!
0 个评论
采纳的回答
Jan
2022-3-9
Names = ["A_m_T17__75788", "A_m_T18__63071", "A_m_T19__51148"];
Cleaned = extractBefore(Names, '__')
0 个评论
更多回答(0 个)
另请参阅
类别
在 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!