Reading File Property Details

조회 수: 59 (최근 30일)
F Sp
F Sp 2020년 6월 8일
댓글: Alon Zaharony 2023년 2월 2일
Hello, I am trying to read information from the file propery detail section that you can access on Windows via the right-click properties. Doing that I found the information I need in the parametres title and subtitle (see attached screenshot). Is there a way MatLab can read this information? It would be very important for my project.
I would really appreciate any help!

채택된 답변

Steven Lord
Steven Lord 2020년 6월 8일
I asked for the imfinfo for one of the sample TIF files included in MATLAB. The Description information shown by Windows appeared in the ImageDescription field of the output of that imfinfo call, or at least the start of the Description in Windows matched the start of the ImageDescription.
data = imfinfo(fullfile(matlabroot, 'toolbox', 'matlab', 'demos', 'example.tif'));
data(1).ImageDescription
  댓글 수: 3
Hugo de Kock
Hugo de Kock 2020년 8월 5일
Hi Steven, I have a similar question, but for an Excel File. My Excel File has some properties (e.g. Subject, Author, Company, Tags, Categories) which I am able to see in Windows Explorer when I right click on the file, then select properties and then go to the "Details" tab. Is there a Matlab Function that can access those file properties?
Kind regards, Hugo
Alon Zaharony
Alon Zaharony 2023년 2월 2일
Hi Hugo.
I don't know about all the properties, but in order to get the time properties (for instance, "Date created") you can use the following commands, when inputFile is the full name of your excel file:
d = System.IO.File.GetCreationTime(inputFile);
creationDateTime = datetime(d.Year, d.Month, d.Day, d.Hour, d.Minute, d.Second);

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Large Files and Big Data에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by