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

Home » Public Forums » archive » Re: Getting File creation data/time
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
Re: Getting File creation data/time [message #14692] Tue, 23 March 1999 00:00
Armand J. L. Jongen is currently offline  Armand J. L. Jongen
Messages: 9
Registered: April 1997
Junior Member
Phillip & Suzanne David wrote:
>
> Try this:
>
> FileName=Dialog_pickfile(/read)
>
> ; Pipeline the output of the dir command to a file
>
> DOSCommand='dir "'+FileName+'"' ; Add quotes around the file name

Briljant! It does the trick..... only:

> Spawn, DosCommand, Result ; You don't have to send the results to a
> file. They get sent back in 'Result'

doesn't work on a Window$ machine as also mentioned in the help files:

; IDLHELP***************************************************** *******
Result

A named variable in which to place the output from the child process.
Each line of output becomes a single array element. If Result is not
present, the output from the child shell process goes to the standard
output.

Under Windows and the Macintosh OS, Result has no effect.
; IDLHELP***************************************************** *******

But then I can use the temp-file trick.

Thanks,

Armand
Re: Getting File creation data/time [message #14696 is a reply to message #14692] Mon, 22 March 1999 00:00 Go to previous message
Phillip & Suzanne is currently offline  Phillip & Suzanne
Messages: 31
Registered: June 1998
Member
Try this:

FileName=Dialog_pickfile(/read)

; Pipeline the output of the dir command to a file

DOSCommand='dir "'+FileName+'"' ; Add quotes around the file name
Spawn, DosCommand, Result ; You don't have to send the results to a
file. They get sent back in 'Result'

; Pull out the dat and time fields

Pieces=STRTRIM(STR_Sep(Result, ' '),2)
Pieces=Pieces(Where(Pieces NE ''))

...


At this point, you'll have to mess with which pieces to parse, as I don't have
a Windows machine to figure them out on. The basic idea is to use the double
quotes as part of the command, and to return the result directly from the
spawn command. Hope this helps.

Phillip
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Can't create pixmap
Next Topic: statistics on large arrays

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

Current Time: Wed Oct 08 13:47:05 PDT 2025

Total time taken to generate the page: 0.00393 seconds