jmp-l
[Top] [All Lists]

Re: How do I get a list of files on disc into JSL?

To: jmp-l@lists.biostat.wustl.edu, kyle.hamar@gmail.com
Subject: Re: How do I get a list of files on disc into JSL?
From: chem engineer <chemical_engr@yahoo.com>
Date: Wed, 25 Jan 2006 04:47:14 -0800 (PST)
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=ncB2qPfmo2yxML7NdJksDTGW1rdoLynoLVvpdTtvNaudswYI7Md2gxRf026/ySxIkfu86/hGg6WIPYzJHYQRof9URQZALvOHtnA7QASctAa2DnOjc88uYUXFhY89YCMaAUOOsFB4J/AE1gFVjyLEA+C/XSoqLxQxBA0AgbxoFyc= ;
In-reply-to: <e446ecef0601241655h5162f289w59820a96094e5fea@mail.gmail.com>
kyle:
ok - there is an old trick from DOS inherited from xylnx/unix ?? called the pipe.
 
C:\>  dir           << you know what this does
C:\>  dir > dir.txt     << this 'pipes' the directory output to the ext file [dir.txt]
 
thus employ something like
dll << CallDLL("gzdll_exec", "c", "dir c:\temp > dir.txt");
then suck up the text file with another JSL command, cant recall ... but something
like "read text()". once you have the file you can clean it up and get what you need.
also ... the DIR command in dose has some switches which can be used to give
the dir text listing in differing formats, i.e. cleaner for your purposes.
 
let me know how you make out .... dude ... good to see you are pushing the
unwielding boundaries of JMP JSL - I feel less alone (he he)
 
cheers
don
 

Kyle Hamar <kyle.hamar@gmail.com> wrote:
On 1/23/06, chem engineer wrote:
> http://www.aracnet.com/~cmorgan/gzdll_driver/ is the link
> to find a key tool which can help you solve your problem.
>
> If you have specific questions on how to make this work for you ... email
> me.

Don,
Thank you for the prompt response. I did finally get a moment today to
look at gzdll - which at first glance appears to be exactly what I
want. In practice however I cannot seem to make it work. Looking at
your message again, I appreciate the Socratic method but fear that
more detail is required.

The example code below runs, but with unexpected results:
dll = LoadDLL("gzdllgz.dll");
dll << CallDLL("gzdll_status_file", "c", "c:\temp\status.txt");
dll << CallDLL("gzdll_browse_initial_dir", "c", "c:\temp");
dll << CallDLL("gzdll_browse", "c", "All Files (*.*)|*.*");
dll << UnloadDLL();

This opens a dialog box that awaits for confirmation. Upon completion
the list of files is written to status.txt.

Questions: Can I avoid the dialog box (or automatically close it?) and
Am I missing a more direct way to obtain a list of files (other than
re-loading status.txt after completion?)

Trying another method,
dll << CallDLL("gzdll_exec", "c", "dir c:\temp");
also fails. I expected the directory to be written to status.txt - but
'dir' does not appear to be executable from this method.

Your assistance is most appreciated. How can I populate a list with
filenames using gzdll?

Kyle


Yahoo! Messenger- Start an email from Y! Messenger,
plus be alerted when new emails arrive.
<Prev in Thread] Current Thread [Next in Thread>