Use dir for files not in any folder

4 ビュー (過去 30 日間)
mehra
mehra 2022 年 8 月 17 日
コメント済み: mehra 2022 年 8 月 17 日
Hello every one,
I wanted to know if I can use dir commant for files that are not in any folder! ( In fact I want to know if I have to put the .mat files inside any folder and then use dir command)
Currently using dir command gives zero results for me.
data_list=dir('VectrinoData.228.22.Vectrino Profiler.00000/*.mat'); %This gives 0*1 struct
  10 件のコメント
Jan
Jan 2022 年 8 月 17 日
編集済み: Jan 2022 年 8 月 17 日
@mehra : Check this again. I'm convinced that you have over seen something:
file = 'VectrinoData.228.22.Vectrino Profiler.00000.mat'
isfile(file)
folder = cd
list = dir(fullfile(folder, '*.mat'))
{list.name}
What output do you get?
mehra
mehra 2022 年 8 月 17 日
This actually worked. But did not know how to accept the answer
dinfo = dir('V*.mat')
And by reducing the numbers of 0 (zeros) in the nam eof the file it also worked. so I guess there was something related with the name of the file.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeFile Operations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by