Posted by
ctrueden on
May 30, 2008; 4:30pm
URL: http://imagej.273.s1.nabble.com/Chose-only-specific-file-on-a-folder-tp3696102p3696103.html
Hi Zhengyu,
Today's daily build of Bio-Formats (
http://www.loci.wisc.edu/ome/formats.html) contains a macro extension
function that allows you to test a file for whether it is one of the formats
that Bio-Formats handles. Here is an example macro:
run("Bio-Formats Macro Extensions");
name=File.openDialog("Choose a file");
thisType="";
Ext.isThisType(name, thisType);
if (thisType == "true") showMessage("File is supported!");
else showMessage("File is an unknown type...");
This approach eliminates the need to explicitly test a large number of
filename extensions.
-Curtis
On Thu, May 29, 2008 at 11:05 PM, Pang, Zhengyu (GE, Research) <
[hidden email]> wrote:
> Dear all,
>
> I have made a macro to batch process images under a folder. But some
> files are not images and I need to ignore these files. How do I do it? I
> have used a function of getFileList() to read all files, but how do I
> ignore some files ending with".zvd" OR ".archive"? Thanks for your help.
>
> Zhengyu
>
> > g Global Research Center
> >
> > ______________________________________________________________________
> >
> > Zhengyu Pang, Ph.D.
> Bioanalytics and Protein Science Laboratory
> Biosciences Global Technology Organization
> > One Research Circle, K1 5B37A
> > Niskayuna, NY12309
> > *
[hidden email]
> > *(518) 387-4015
> >
> >
>