Renaming file name with variable.

조회 수: 2 (최근 30일)
ZK
ZK 2013년 1월 16일
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']);
  댓글 수: 1
ZK
ZK 2013년 1월 16일
Thank You, works perfect.

댓글을 달려면 로그인하십시오.

추가 답변 (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