Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Rename a bunch of time files

1 vue (au cours des 30 derniers jours)
Elder Santos
Elder Santos le 13 Déc 2018
Clôturé : MATLAB Answer Bot le 20 Août 2021
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?

Réponses (1)

Sean de Wolski
Sean de Wolski le 13 Déc 2018
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