Renaming file names using matlab

I have seen the page
I have a folder A with files
Report.txt
Report.txt
Report.txt
I would like to rename them as
Report 1 (2020_05_31).txt
Report 2 (2020_06_01).txt
Report 3 (2020_06_02).txt
Please advise.

Respuestas (1)

Abhisek Pradhan
Abhisek Pradhan el 4 de Jun. de 2020

0 votos

Try to concat "1 (2020_05_31)" part by modifying it programmatically as per the need. Store it as a new name and use movefile to rename it.
Refer the following link for as a reference. Consider adding fullfile path inside movefile function.

Categorías

Más información sobre File Operations en Centro de ayuda y File Exchange.

Productos

Versión

R2020a

Etiquetas

Preguntada:

el 28 de Mayo de 2020

Comentada:

el 6 de Jun. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by