Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Rename a bunch of time files

1 回表示 (過去 30 日間)
Elder Santos
Elder Santos 2018 年 12 月 13 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Please, I have a bunch of time files in a folder that I want to rename of them. For example, I have a T *. mat file whose name is “T_2018_04_28_00_01_25.mat”. I want to rename this file to T_2018_04_28_00_00_00.mat and the following files are added 3 mins until to complete a 24 hours and rename all of them.
Example:
T_2018_04_28_00_01_25 -> T_2018_04_28_00_00_00
T_2018_04_28_00_04_25 -> T_2018_04_28_00_03_00
T_2018_04_28_00_07_25 -> T_2018_04_28_00_06_00
T_2018_04_28_00_10_25 -> T_2018_04_28_00_09_00
T_2018_04_28_00_13_25 -> T_2018_04_28_00_12_00
T_2018_04_28_00_16_25 -> T_2018_04_28_00_15_00
T_2018_04_28_00_19_24 -> T_2018_04_28_00_18_00
T_2018_04_28_00_22_24 -> T_2018_04_28_00_21_00
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
T_2018_04_28_23_56_55 -> T_2018_04_28_23_54_00
T_2018_04_28_23_59_54 -> T_2018_04_28_23_57_00
Please, How can I do this?

回答 (1 件)

Sean de Wolski
Sean de Wolski 2018 年 12 月 13 日
Look at dir() and movefile()

Community Treasure Hunt

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

Start Hunting!

Translated by