Effacer les filtres
Effacer les filtres

How do I find the path of an external hard drive plugged into my device with MatLab?

6 vues (au cours des 30 derniers jours)
I am using an external hard drive on multiple devices on the same network. I need to access data on a single external hard drive across these multiple devices.
I would like to have a few lines in my code before loading the data from this external hard drive that runs a search for the hard drive name without me having to change it every time I plug the hard drive into a different device.
Is there a way to do this?

Réponses (1)

Jan
Jan le 19 Avr 2018
The answer depends on the used operating system. Under Windows you can check the existence of a file by changing the drive letter, but this does not work under MacOS and Linux.
If you are working in a network, a trivial solution is to share your device as a network folder. Then you can access it by the UNC path (under Windows): //192.168.1.10/SharedFolder .
Why do you want to search for the "hard drive name", especially "without me having to change it every time"? Does your hard drive has a different name for each access?

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by