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

Home » Public Forums » archive » FILEPATH bug/feature in IDL for Windows
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
FILEPATH bug/feature in IDL for Windows [message #1470] Wed, 29 September 1993 14:35
hadfield is currently offline  hadfield
Messages: 11
Registered: October 1993
Junior Member
A problem and a solution: When its TMP keyword is set, the USERLIB function
FILEPATH in IDL (version 3.1) is supposed to return a fully-qualified pathname
in the "proper place for temporary files under the current operating system".
On my system that is 'c:\temp'. FILEPATH gives:

IDL> print,filepath('foo.dat',/tmp)
\tmp\foo.dat

There is no \tmp directory! The solution is to replace the following code:

IF (do_tmp) THEN BEGIN
CASE !VERSION.OS OF
...
'windows': root_dir = '\tmp'

with

IF (do_tmp) THEN BEGIN
CASE !VERSION.OS OF
...
'windows': root_dir = getenv('temp')

whence

IDL> print,filepath('foo.dat',/tmp)
C:\temp\foo.dat

The environment variable 'temp' has to be defined. To the best of my
recollection a line to do this is added to autoexec.bat in a standard Windows
installation.

============================================================ ===========
Mark Hadfield NIWA Oceanographic (Taihoro Nukurangi)
hadfield@storm.greta.cri.nz Wellington, New Zealand
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: FILEPATH bug (feature) in IDl for Windows
Next Topic: idl_motif keymap complains <- help

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

Current Time: Wed Oct 08 13:46:03 PDT 2025

Total time taken to generate the page: 0.00486 seconds