Copyfile fails in R2022a but not in R2021b
6 ビュー (過去 30 日間)
古いコメントを表示
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?
0 件のコメント
回答 (1 件)
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
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!