movefile creates directory instead of moving file - no wildcards involved
조회 수: 2 (최근 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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 File Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!