comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Getting File creation data/time
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Getting File creation data/time [message #14716] Mon, 22 March 1999 00:00
Armand J. L. Jongen is currently offline  Armand J. L. Jongen
Messages: 9
Registered: April 1997
Junior Member
Hi,

I am probably missing something completely but I am not able to find a
function/routine to get a file creation data/time. The obvious
work-around (Win9x, IDL 5.2):

FileName=Dialog_pickfile(/read)

; Pipeline the output of the dir command to a file

DOSCommand='dir '+FileName+' > datetime.txt'
Spawn, DosCommand

; Open the fie, read the output and delete it after closing

OpenR, lun, 'datetime.txt', /Get_Lun, /Delete
Skip=StrArr(6)
Readf, lun, Skip
Close, lun
Free_lun, lun

; Pull out the dat and time fields

Pieces=STRTRIM(STR_Sep(Skip[5], ' '),2)
Pieces=Pieces(Where(Pieces NE ''))

FileDate=Pieces[3]
FileTime=Pieces[4]

failes when there are spaces in the FileName, as the dir-command is
unable to handle these. Before writing a little piece of C-code to do
the job I wondered if somebody has any suggestions.

Ta!

Armand
[Message index]
 
Read Message
Previous Topic: Colors of a 24-bit Color Image
Next Topic: Help IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 12:34:15 PDT 2025

Total time taken to generate the page: 0.32177 seconds