Renaming file name with variable.

4 次查看(过去 30 天)
Hi i would like to rename or save as new file, generated by:
fid = fopen('TempFile.htm','w');
In the name of new file I would like to use variable
e = 20120319 (saved as a char)
so the new file should look like this
20120319.htm
Do you have any ideas?
Thank You

采纳的回答

Pedro Villena
Pedro Villena 2013-1-16
e = '20120319';
copyfile('TempFile.htm',[e '.htm']);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by