Error in script using copylink

조회 수: 3 (최근 30일)
dormant
dormant 2022년 8월 18일
댓글: Walter Roberson 2022년 9월 7일
I have a matlab script that runs as a cron job on Linux. A few days ago, the script started failing. I traced it to the copylink statement, which copies a bunch of png files to a network share.
This is what I get when I run the statement from the command line:
>> copyfile( '*.png', dirFigsPing );
Error using copyfile
Invalid cross-device link
We had some network issues recently, but everything should be back to normal.
I have no problems copying the files using the commnand line of File Manager.
Any idea what the problem might be?

답변 (1개)

Walter Roberson
Walter Roberson 2022년 8월 18일
We had some network issues recently, but everything should be back to normal.
... but they are not back to normal. You need to unmount the source and destination filesystem and remount them.
  댓글 수: 3
dormant
dormant 2022년 8월 19일
I changed to using system, and it works.
%copyfile( '*.png', dirFigsPing );
cmd = sprintf( 'cp *.png %s', dirFigsPing );
system( cmd );
Totally stumped!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Manage Products에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by