'The network path was not found' intermittent error only on VPN
조회 수: 15 (최근 30일)
이전 댓글 표시
Hello, I have code that scrapes a database and saves data in seperate directories by station, year, and month.
Because I'm pulling data regularly, I have the following code to create a new directory if the directory doesn't yet exist.
if ~exist(stationfolderloc, 'dir');
mkdir(stationfolderloc);
end
stationfolderloc is formatted as '[servername]\[some sub directories]\[station_name]\[year]\[month]' with the station_name, year, and month updating based on the data being pulled.
This never fails when I have a wired ethernet connection to the office network (the directory is on a server on that network). However, when I am out of office and connecting via VPN I inconsistantly get the following error. (is red text)
Error using mkdir
The network path was not found.
Error in [Code_name] (line XXX)
mkdir(stationfolderloc);
However, I am able to navigate to the directory in windows explorer, and have no problem navigating to it in Matlab such that it can be the Current Folder. Using the exist function in Matlab gives an output of 7 (exists and is a directory). Using ~exist(stationfolderloc, 'dir') returns 0. So the 'IF' statement shouldn't even allow the code to get to the mkdir command.
I've setup monitoring for the VPN and confirmed the connection never drops when the error occurs. VPN is FortiClient, if that matters, I've been working with them to troubleshoot and they believe its a matlab issue.
댓글 수: 2
chrisw23
2024년 4월 3일
It seems to be a security issue. Probably you are authenticated different via VPN. It may be a different group membership that prevents the creation of new folders. This is no Matlab issue.
You can try to map your root folder (ServerShare\...) and access the mapped drive by Matlab.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!