Specified folder does not exist error for all folders

7 views (last 30 days)
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.

Answers (1)

Jan
Jan on 2 May 2019
Edited: Jan on 2 May 2019
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 Comment
Bryn Phillips
Bryn Phillips on 2 May 2019
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.

Sign in to comment.

Categories

Find more on File Operations in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!