Login  Register

Re: Filename extract and rename

Posted by Herbie on Feb 03, 2016; 10:27am
URL: http://imagej.273.s1.nabble.com/Filename-extract-and-rename-tp5015526p5015528.html

Good day Richie,

please have a look at the "Built-in Macro Functions"-manual that is
available via:
<http://rsb.info.nih.gov/ij/developer/index.html>

There are quite a number of text-processing functions that will help you
performing what you need.

E.g.
startsWith, endsWith, indexOf, substring, matches

But be also aware that ImageJ is about image processing not text
processing or general file handling.

HTH

Herbie

:::::::::::::::::::::::::::::::::::::::::
Am 03.02.16 um 10:25 schrieb richieclose:

> I'm looking to build out a macro which will extract all file names in a
> directory, and perform a rename on the file before saving the new file name
> out to a text file.  The first piece I can do using macro's already
> available, but I'm struggling trying to figure out the latter.
>
> A typical filename would look something like this:
> *image_D2016-02-02T10-30-23-653793Z_0.JPG* and what I would like to do is
> rename it to *T10-30-23-653793Z_0.JPG* (everything from the letter 'T'
> onwards).
>
> Any help would be much appreciated!
>
> Thanks
>
> Richie
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/Filename-extract-and-rename-tp5015526.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html