Borrar filtros
Borrar filtros

movefile creates directory instead of moving file - no wildcards involved

1 visualización (últimos 30 días)
Using R2020a on Windows 10 64-bit, I've started encountering a problem where using movefile function to rename a file creates the target file as a directory instead of as a file and then fails. There are no wildcards involved, just two explicitly named filenames. The files are text files on a remote shared folder.
[status, msg] =movefile(myjobfile, myfinaljobfile);
where the values of the parameters in this case are:
myjobfile =
'\\myremotepc\Communications\NearlyCompletedUSIWorker-R5099293-20200916112530284.txt'
myfinaljobfile =
'\\myremotepc\Communications\CompletedUSIWorker-R5099293-20200916112530284.txt'
And here's the output of movefile in the case above:
status =
logical
0
msg =
'The system cannot find the file specified.'
After the execution (and erroring out) of the code line above, in the Communications folder is now a new subfolder named CompletedUSIWorker-R5099293-20200916112530284.txt and the original "NearlyCompleted..." one is still present.
Name Size Type Modified Attr
CompletedUSIWorker-R5099293-20200916112530284.txt File Folder Today 11:28 AM -----
NearlyCompletedUSIWorker-R5099293-20200916112530284.txt 22.3 KB Notepad++ Document Today 11:28 AM -a---
Some other details:
  • The very same code is running on an also-remote Windows 7 system and does not encounter this problem.
  • The PC hosting the shared folder is Windows 7.
Is this a MATLAB R2020a bug on Windows 10?

Respuestas (0)

Categorías

Más información sobre Environment and Settings en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by