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
Subject: Re: How do I get a list of files on disc into JSL?
From: chem engineer <chemical_engr@yahoo.com>
Date: Mon, 23 Jan 2006 20:12:26 -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=6YpG/OtFyH9Bt3cXhoRb6/NsIwdqXapP8qfXQfG0de7ApKT6DkuWQsdsl6FcOsYoVQzN3GNwqQCLg2Yk7cHFayFYzxvMio6VzLYFXmt2Ex7LewCde2I84jpmLGm0OuJzf0wCiazu5AAmS595vleBqlKQo7gZPsizBzV2ylqEXrw= ;
In-reply-to: <e446ecef0601231651j125d4608wc35ff03481505118@mail.gmail.com>
Kyle:
Unfortunately directory file list access is not posible in JSL.
However, if you look carefully (via google) ... you can find a little .dll extension
that gives you the rudiments to do file access. Oh heck ... why not be generous ...
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.
But if you look at the info at the link carefully and think about it ... you should be
able to accomplish your stated goal.
Don


Kyle Hamar <kyle.hamar@gmail.com> wrote:
I would like to run a series of test on some local data files. The
scheduling part is easy (attached below.)

If all my files are in one location (ie. directory) I would like to
automate loading the list of files to be acted upon. Can this be done
in JSL? My goal is to replace the hard-coded "files = {list}" with a
routine to access a given directory and act upon every file at that
location.

How do I list files in a directory from JMP?

Kyle

================================

// With a given list of files:
files = { "first",
"second",
"third",
"fourth"};

PeriodicCheck = expr( write("Checking Now\!r");
stamp = Format(today(),"yyyymmdd");
write(stamp||" "||Format(today(),"h:m:s")||" ");
write("Scheduling all tasks listed\!r");
schedule(5, task1);
schedule(10, task2);
//add more tasks here
schedule(20, PeriodicCheck) );

task1 = expr( ); // ommitted for brevity

task2 = expr (
for (r=1, r<=n items(files), r++,
Write( r,". Working on file: "||files[r]);
Write("\!r"); //new line
);
write("task 2 completed at "||Format(today(),"h:m:s")||" \!r");
write("=================================\!r \!r");
);
PeriodicCheck;


Yahoo! Photos
Got holiday prints? See all the ways to get quality prints in your hands ASAP.
<Prev in Thread] Current Thread [Next in Thread>