Help using copyfile on mac osx

Sorry if this question has been asked before, but I can't seem to figure out how to use copyfile, movefile or any of the equivalents on my Mac OSX. I keep receiving this error, MATLAB:COPYFILE:OSError.
I'm thinking there's a solution either using the system function or the unix function, but I can't get anything to work. For example, how do I rewrite this line of code. I have a file, test.txt, and just want to make a copy of it as test2.txt. I'm already in the correct directory.
[status,message,messageID]=copyfile('test.txt','test2.txt')

댓글 수: 1

Geoff Hayes
Geoff Hayes 2014년 8월 11일
John - when you run the above statement, what is the message value? The MATLAB:COPYFILE:OSError is the messageID but it is the other that may provide some more detail.
I am running MATLAB 2014a on a Mac OS X 10.8.5 and have not experienced any problems using the movefile or copyfile functions.

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

질문:

2014년 8월 11일

댓글:

2014년 8월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by