How to rename many files in a folder simultaneoulsy using matlab

1 回表示 (過去 30 日間)
parvathy prathap
parvathy prathap 2021 年 5 月 24 日
コメント済み: parvathy prathap 2021 年 5 月 24 日
I have jpeg files with names like
501(501)
501(502)
501(503)
501(504) etc etc
I want to rename it as
501
502
503
504 etc etc
There are thousands of such files in the folder. So its difficult to do it manually. Kindly advise how to do this using matlab. Any help on this regard would be appreciated.

採用された回答

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021 年 5 月 24 日
Hi,
Here is a nice robust answer code to rename files proposed by Walter that you can employ in your exercise.
Good luck
  1 件のコメント
parvathy prathap
parvathy prathap 2021 年 5 月 24 日
Thanks for the response. I think it refers to a different requirement, let me see if i can get an idea from it.

サインインしてコメントする。

その他の回答 (1 件)

DGM
DGM 2021 年 5 月 24 日
Not everything has to be done with Matlab.
If you're using *nix:
rename 's/501\(//;s/\)//' 501*.jpg
But considering that you're describing filenames with no extension, I'm guessing you might be in Windows.
  1 件のコメント
parvathy prathap
parvathy prathap 2021 年 5 月 24 日
Thanks for your response. Yes, its windows.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by