Open *.tif files with while loop

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Open *.tif files with while loop

Robert Barton
Hi all,

I would like to create a macro that would open a tiff file out of a given
directory, rename and save it to a new location, delete the original, and
then restart the process until all tiff files are out of the original
directory.

The part I am having trouble with is opening any tiff file in a directory
without giving a specific file name.

Any help is appreciated.

Robert
Reply | Threaded
Open this post in threaded view
|

Re: Open *.tif files with while loop

ctrueden
Hi Robert,

Use getFileList and loop over the result with a for loop. See this link for
an example:
https://skyking.microscopy.wisc.edu/svn/java/trunk/utils/macros/recursiveTiffConvert.txt

-Curtis

On Wed, Sep 3, 2008 at 3:40 PM, Robert Barton <[hidden email]> wrote:

> Hi all,
>
> I would like to create a macro that would open a tiff file out of a given
> directory, rename and save it to a new location, delete the original, and
> then restart the process until all tiff files are out of the original
> directory.
>
> The part I am having trouble with is opening any tiff file in a directory
> without giving a specific file name.
>
> Any help is appreciated.
>
> Robert
>