MATLAB: Am I unable to copy to root directories of drives when using the COPYFILE function in MATLAB 7.0.1 (R14SP1)

copyfiledirectorylanguageMATLABnon-englishroot

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

Best Answer

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');