how to find specific Folder's path ?
50 ビュー (過去 30 日間)
古いコメントを表示
Suppose I have one folder called 'Tools Ordered'
its path is 'C:\New\Folders\Tools\Tools Ordered'
Then If I want to find this above path by only using the name 'Tools Ordered', then how can I find it ?
Can anyone suggest me any idea ?
0 件のコメント
回答 (1 件)
Jan
2022 年 12 月 2 日
移動済み: Jan
2022 年 12 月 2 日
This is impossible. There could be a huge number of different locations, e.g. a public network share "\\123.234.12.167\Share\Tools Ordered". So if you do not have the additional information about the disk or that it is a local disk, a search can need too much time.
If you do know the disk:
List = dir(fullfile('C:\', '**', 'Tools Ordered', '.'));
Paths = {List.folder}
2 件のコメント
Jan
2022 年 12 月 4 日
Do you mean:
List = dir(fullfile(cd, '**', 'Tools Ordered', '.'));
Paths = {List.folder}
Note that pwd calls cd only, so you can call cd directly.
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!