Getting information about the dates for the current experiment?
jjweimer
Is there any way to get information about these specifications for an experiment?
* Data Created
* Date Last Opened
* Date Modified (or Last Saved)
I might have hoped to use an equivalent to ExperimentInfo.
I don't know about the second one, but for the first and third try this:
GetFileFolderInfo/Q/Z/P=home igorinfo(12)
if(!V_flag)
print Secs2Time(V_creationDate,3)+" on "+Secs2Date(V_creationDate,-2)
print Secs2Time(V_modificationDate,3)+" on "+Secs2Date(V_modificationDate,-2)
endif
end
May 16, 2023 at 10:52 pm - Permalink
On a mac the date last opened can be found by querying the metadata attributes for the file using the unix command mdls and the kMDItemLastUsedDate attribute name.
May 17, 2023 at 03:30 am - Permalink
@Chozo -- Thank you. The code does what I need. @Tony -- Chozo's solution is better, being platform agnostic.
May 17, 2023 at 09:43 am - Permalink
Yes, but GetFileFolderInfo doesn't give you "Date Last Opened". For that you may need platform-specific solutions.
May 18, 2023 at 09:10 am - Permalink
I've decided to forgo the documenting the Date Last Opened in respect to a more immediate need to be platform agnostic (and in light that my envelope of available time+resources does not include exploring how to program this option on Windows systems).
I also might hope that WM may be inclined in a future update to include a way to get Date Experiment Last Opened information, e.g. via a return from IgorInfo.
May 18, 2023 at 11:03 am - Permalink