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

Home » Public Forums » archive » Re: mkdir?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: mkdir? [message #23752 is a reply to message #23747] Wed, 14 February 2001 07:19 Go to previous messageGo to previous message
Jeff Jones is currently offline  Jeff Jones
Messages: 2
Registered: February 2001
Junior Member
"Christopher W. O'Dell" wrote:
>
> Is there anyway to create a directory in your OS from within
> IDL?
> I keep running into problems using the SAVE function, when I
> have forgotten to create the directory to which I am
> saving. I just want to add a line of code that checks if
> the directory exists, and if it doesn't it makes the
> directory.
> BTW, I'm running on a Windows platform (your are welcome to
> make fun of me at this point...)
>
> Thanks,
> Chris O'Dell
>
> UW-Madison Physics Dept.


Here is what I do under Unix in IDL 5.1:

dir = '/the/directory/im/looking/for/'

; Create the directory, if necessary.
check = findfile( dir, count=direxists )
if (direxists eq 0) then spawn, 'mkdir '+dir


I am sure something equivalent can be done in Windows.

Jeff.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: True Color, but !d.table_size eq 64?
Next Topic: I have the craziest idea...

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

Current Time: Wed Oct 08 15:27:44 PDT 2025

Total time taken to generate the page: 0.00481 seconds