Copyfile fails in R2022a but not in R2021b

조회 수: 6 (최근 30일)
Darrel Conway
Darrel Conway 2022년 8월 22일
답변: Shuba Nandini 2023년 9월 8일
I have a fairly large MATLAB driven test system that uses copyfile to place some test specific files into place for runs. On Ubuntu 2004 with MATLAB R2021b, this line
copyfile('/home/djc/gsfcgmat/jazz/test/script/gmatdata','/home/djc/gsfcgmat/TestTarget/GMAT-R2022a-Linux-x64','f')
copies the files into place. On the same system using MATLAB R2022a, the command fails and reports
Error using copyfile
Invalid argument
Why is it failing under MATLAB R2022a?

답변 (1개)

Shuba Nandini
Shuba Nandini 2023년 9월 8일
Hello Darrel,
Thanks for reaching us over email. This is a known issue that only appears on some machines, and we currently do not have a workaround for it.
Please try the following steps to diagnose the machine that is having issues:
1) Try to use the system's copy command from MATLAB. You can use the following example:
!cp Firefox_wallpaper.png ../dir2/"
2) Try using fully qualified URLs, where 'path' is the appropriate full path:
copyfile('file:///path/to/Firefox_wallpaper.png', 'file:///path/dir2/Firefox_wallpaper.png');
3) Make sure that 'copyfile' is not shadowed by another function, using command:
which -all copyfile
4)Check if 'copyfile' command works on both command line and MATLAB command line.
5)Check permissions on Unix using 'la -ls' and change them with 'chmod' if necessary.
6)Try reinstalling the MATLAB.
I hope this helps!
Regards,
Shuba Nandini

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by