Specified folder does not exist error for all folders

조회 수: 6 (최근 30일)
Bryn Phillips
Bryn Phillips 2019년 5월 2일
댓글: Bryn Phillips 2019년 5월 2일
Hi all,
I'm trying to write a video File from images. The script used to work but I've since updated to windows 10 and reinstalled MATLAB and I am getting the following error:
" Error using SV_Video_Capture (line 52)
The specified folder, D:\OneDrive\OneDrive - XXXX\Documents\MATLAB, does not exist "
SV_Video_Capture is the name of the script.
The Code it relates to is:
VidName = strcat('Test','.avi') ;
f = fullfile(userpath,VidName);
outputVideo = VideoWriter(f) ; This is line 52.
The script is throwing this error regardless of what I change the path to in fullfile (I was usiung userpath as it's a default search directory) this includes just using cd. Matlab can "see" the folder and knows it exists as running exist returns 7 - meaning the folder is there.
Any help would be much appreciated.

답변 (1개)

Jan
Jan 2019년 5월 2일
편집: Jan 2019년 5월 2일
This might be a problem with OneDrive folders. Did you see this already: https://www.mathworks.com/matlabcentral/answers/354614-cd-to-onedrive-doesn-t-work-on-windows-10-build-16273-1 ?
"throwing this error regardless of what I change the path to in fullfile" - Then please post, which other pathes are failing. Where exactly is the userpath? On the OneDrive again?
  댓글 수: 1
Bryn Phillips
Bryn Phillips 2019년 5월 2일
I have solved this - it was my own error. When entering the filename I had it surrounded by quote marks - not inverted commas.
Thank you for your quick reply regardless.

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

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by