movefile creates directory instead of moving file - no wildcards involved

4 次查看(过去 30 天)
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?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 File Operations 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by