Why am I unable to copy to root directories of drives when using the COPYFILE function in MATLAB 7.0.1 (R14SP1)?
2 views (last 30 days)
Show older comments
When using non-English language settings in Windows, the COPYFILE function returns errors when attempting to write to "root" Windows directories such as A:\ and C:\. For example, the following command:
[status,message,messageid]=copyfile('a.mat','C:\a.mat','f')
Results in the the following contents of status and messageid:
status =
0
messageid =
MATLAB:COPYFILE:OSError
Accepted Answer
MathWorks Support Team
on 27 Jun 2009
This bug has been fixed in Release 14 Service Pack 2 (R14SP2). For previous releases, read below for any possible workarounds:
There is a bug in MATLAB 7.0.1 (R14SP1) that affects the way the COPYFILE function handles copying to "root" Windows directories on machines with non-English language settings. To work around this issue, you can use the DOS Copy command within MATLAB to copy files to "root" Windows directories as follows.
dos('copy a.mat C:\a.mat');
0 Comments
More Answers (0)
See Also
Categories
Find more on File Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!