'The network path was not found' intermittent error only on VPN
14 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
chrisw23
am 3 Apr. 2024
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.
Antworten (0)
Siehe auch
Kategorien
Mehr zu File Operations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!