MATLAB Answers

0

Rename a bunch of time files

Asked by Elder Santos on 13 Dec 2018
Latest activity Answered by Sean de Wolski
on 13 Dec 2018
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?

  0 Comments

Sign in to comment.

1 Answer

Answer by Sean de Wolski
on 13 Dec 2018

Look at dir() and movefile()

  0 Comments

Sign in to comment.