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

Home » Public Forums » archive » Return the name of the last (newest) file ?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Return the name of the last (newest) file ? [message #31675] Tue, 13 August 2002 09:37 Go to next message
Kolbjorn Bekkelund is currently offline  Kolbjorn Bekkelund
Messages: 20
Registered: August 2002
Junior Member
No Message Body
Re: Return the name of the last (newest) file ? [message #31767 is a reply to message #31675] Wed, 14 August 2002 09:49 Go to previous message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
I am sorry, I must have missed some fine point, but why not use simply

pro get_newest
temp = findfile("*", count=n_files)
date = lon64arr(n_files)
for i = 0, n_files - 1 do begin
openr, 100, temp[i]
date[i] = (fstat(100)).mtime
close, 100
endfor
file_index = where(date eq max(date))
print, temp[file_index]
end

This would work not just on Unix.
Pavel

Kolbjorn Bekkelund wrote:
>
> Hi.
>
> I'm modifying an old IDL-routine (under Linux and IDL 5.4), plotting some of our ozone lidar data.
> This has to be done manually today, but I'm working against an automation
> of this job now. The final stage here is to have IDL run by cron, finding the last
> (newest) file by itself and process it.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Return the name of the last (newest) file ?
Next Topic: Widget Help

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

Current Time: Wed Oct 08 19:26:03 PDT 2025

Total time taken to generate the page: 0.00573 seconds