V_ModificationDate from Loaded files
astrotool
The problem I am having is that the time data from the files are only in seconds of a day, so if I wanted to plot a weeks worth of data it will plot the seven days on top of each other instead of according to the day they were taken.
After reading the help I saw that they had the get GetFileFolderInfo function that allows you to obtain the Modification Date. The only thing wrong with that is you have to input the location of the file to do that. So I want to know how to take the wave I just loaded and insert its path into the GeFileFolderInfo function
Something like this:
Function GetFilesandInfo()
do
LoadWave/J/D/A=wave/K=0/L={4,6,0,0,0}
if (V_flag == 0) // Break if user hit the cancel button.
break
endif
GetFileFolderInfo/Z "File That I Just Loaded"
if( V_Flag == 0 && V_isFile ) // file exists
Print Secs2Date(V_modificationDate,0)
Duplicate TimeAll, TimeOld
TimeAll-=TimeOld[0]
TimeAll+=V_modificationDate
Killwaves TimeOld
endif
Concatenate/NP {wave0}, TimeAll
Killwaves wave0
//.... etc. for more waves
while(1)
End
do
LoadWave/J/D/A=wave/K=0/L={4,6,0,0,0}
if (V_flag == 0) // Break if user hit the cancel button.
break
endif
GetFileFolderInfo/Z "File That I Just Loaded"
if( V_Flag == 0 && V_isFile ) // file exists
Print Secs2Date(V_modificationDate,0)
Duplicate TimeAll, TimeOld
TimeAll-=TimeOld[0]
TimeAll+=V_modificationDate
Killwaves TimeOld
endif
Concatenate/NP {wave0}, TimeAll
Killwaves wave0
//.... etc. for more waves
while(1)
End
GetFileFolderInfo/Z S_path+S_fileName
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
June 5, 2008 at 04:14 pm - Permalink
June 6, 2008 at 11:05 am - Permalink