Error in script using copylink

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?

Respuestas (1)

Walter Roberson
Walter Roberson el 18 de Ag. de 2022

0 votos

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 comentarios

dormant
dormant el 19 de Ag. de 2022
I had remounted the file system and rebooted the computer. I did this again, but I get the same result.
I am stumped.
dormant
dormant el 19 de Ag. de 2022
I changed to using system, and it works.
%copyfile( '*.png', dirFigsPing );
cmd = sprintf( 'cp *.png %s', dirFigsPing );
system( cmd );
Totally stumped!

Iniciar sesión para comentar.

Categorías

Más información sobre Software Development Tools en Centro de ayuda y File Exchange.

Productos

Versión

R2022a

Etiquetas

Preguntada:

el 18 de Ag. de 2022

Comentada:

el 7 de Sept. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by