Effacer les filtres
Effacer les filtres

access file from ext. hdd

12 vues (au cours des 30 derniers jours)
ektara
ektara le 1 Jan 2014
Commenté : Jan le 24 Mar 2021
Hi,
How to access a file from external hard disc ?
for example from, "/media/ext_hdd/"
Mahesh

Réponses (2)

Jan
Jan le 1 Jan 2014
This works directly, e.g.:
FID = fopen('/media/ext_hdd/YourFile.ext', 'r')
This works exactly as for files on the internal disk. So please explain, what you have tried and which problems occur.
  5 commentaires
Walter Roberson
Walter Roberson le 24 Mar 2021
dir() does not use the search path. But you can use
projectdir = 'D:\AHN3\DSM05';
filelist = dir(projectdir);
Jan
Jan le 24 Mar 2021
It is a bad programming practize to call addpath to append a folder containing data files. Include only folders in the Matlab path, which contain your M-files.
To get a list of files:
filelist = dir('D:\AHN3\DSM05');

Connectez-vous pour commenter.


Larry B
Larry B le 24 Mai 2019
I wanted to access data files on a external drive named "My Passport" in matlab using my MAC. The following is example of the path layout for the filename to make that happen:
fname ='/Volumes/My Passport/Tower_Collect/201808B.raw';
The data was successfully loaded and processed

Catégories

En savoir plus sur Develop Apps Using App Designer 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