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!