Directory/Path of a file

35 vues (au cours des 30 derniers jours)
Bhomik Luthra
Bhomik Luthra le 1 Juil 2013
Hello all
Is it possible to find the path of a filename given as input. Suppose say, I want to find the path to the file "XYZ.doc" in my system. Is there a way to find it in MATLAB?
Thanks
Bhomik

Réponses (1)

Jan
Jan le 1 Juil 2013
Modifié(e) : Jan le 1 Juil 2013
This searches the specified file name in all folders of the Matlab path:
File = which('XYZ.doc')
If this satisfies your needs depends on what exactly "your system" means. Does this mean the Matlab path, all local disks, all folders on the local disks with read access for the current user, or even all network connections? Even asking Google to search in the net is possible.

Catégories

En savoir plus sur Environment and Settings 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