How to access UNC path with credentials?
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Binay Chandra
am 10 Nov. 2017
Kommentiert: Colin
am 17 Mär. 2021
I am looking for the ways to access UNC paths which require credentials. I am currently using Matlab 2016b. Please help.
0 Kommentare
Akzeptierte Antwort
Guillaume
am 10 Nov. 2017
There's no direct way to access them in matlab. You probably could go through Java, or if on Windows, through .Net, but probably the simplest would be to mount the UNC through the OS. if on windows:
drivename = 'U:'; %whichever you want
unc = '\\somewhere\somepath\
user = 'username';
password = 'password';
system(sprintf('net use %s "%s" /user:%s %s', drivename, unc, user, password));
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Java Client Programming 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!