필터 지우기
필터 지우기

Change the name of csv file and save into a folder.

조회 수: 11 (최근 30일)
Jake
Jake 2015년 6월 23일
댓글: Jan 2015년 7월 4일
Hi MATLAB experts,
How can I change the name of csv file and save the name changed? After that, I'd like to move it to a folder..
For instance, I have csv file here, and want to change the name to 'DATA' from 'Value' as follows:
fileList = Value.csv
And move and save this changed file to a folder ('C:\myfolder\')..
Thanks for any help you can provide in advance!!
Best Regards, Jake

채택된 답변

Stephen23
Stephen23 2015년 6월 23일
편집: Stephen23 2015년 6월 23일
To rename a file use movefile (yes, really!):
movefile('oldname.csv','newname.csv')
To copy a file to another directory, use copyfile
copyfile('newname.m','D:/work/Projects/')
Please read the documentation carefully for both of those functions. Note that copyfile can also be used to rename a file or folder, and that the filenames can include relative-path or full-path if the file is not located in the current directory.
  댓글 수: 4
Image Analyst
Image Analyst 2015년 7월 4일
Stephen - I accepted it (for Jake) and voted for it.
Jan
Jan 2015년 7월 4일
@Image Analyst: The answer has not been accepted. I've done this for you, because you tried to do this for Jake.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by