Login  Register

Re: Renaming files

Posted by Houssin, Nathalie Samantha Laetitia on Apr 07, 2020; 3:36pm
URL: http://imagej.273.s1.nabble.com/Renaming-files-tp5023166p5023185.html

Good day Herbie,

I apologize for belated message
Thank you for your help with the macro and your advice on studying the Built-in Macro Functions .. I will have a careful look on the ones that could help me automate some of the tasks I have to do with my batches of images

Bests,

Nathalie

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

From: Herbie<mailto:[hidden email]>
Sent: Sunday, April 5, 2020 7:55 AM
To: [hidden email]<mailto:[hidden email]>
Subject: Re: Renaming files

Good day Nathalie,

concerning labels of type

//
str = "C00XZ00Y";
//
// the following two lines of ImageJ macro code will do
//
a = split( str, "Z" );
str = a[0] + "_Z" + a[1] + "_t00Z";
//
print( str );
exit();

Please try to understand what happen according to these two line by
studying:
<https://urldefense.com/v3/__https://imagej.nih.gov/ij/developer/macro/functions.html__;!!KGKeukY!i0Y3SdRYsUQMPPBC4Cy1r0WrFKnSBQJsxXSKjUmlwvhentZVYOcYQIxYgaxoyrlV$ >

I didn't have a look at the provided link.

Regards

Herbie

:::::::::::::::::::::::::::::::::::::::::::::::::::::::

Houssin, Nathalie Samantha Laetitia wrote

> Hello,
>
> I hope everyone is safe and coping with the sanitary situation.
> I am trying to rename batch of files and have not been able to come up
> with a solution not too time consuming
> My files are labeled with C00XZ00Y and I would like to put a string in
> between as well as add the suffix _t00Z
> so that it would look like C00X_Z00Y_t00Z
> My stacks are comprised of 25 to 40 images with 3 channels
> Thank you for any help you can provide with this
>
> Bests,
>
> Nathalie
>
> Here is a link if you want to see the filenames
> https://urldefense.com/v3/__https://www.dropbox.com/sh/4qc2e1qyq1b4vr8/AAC9kPzGvFXE-8rzN5eD95Epa?dl=0__;!!KGKeukY!i0Y3SdRYsUQMPPBC4Cy1r0WrFKnSBQJsxXSKjUmlwvhentZVYOcYQIxYgZ4-o-7S$<https://urldefense.com/v3/__https:/www.dropbox.com/sh/4qc2e1qyq1b4vr8/AAC9kPzGvFXE-8rzN5eD95Epa?dl=0__;!!KGKeukY!i0Y3SdRYsUQMPPBC4Cy1r0WrFKnSBQJsxXSKjUmlwvhentZVYOcYQIxYgZ4-o-7S$>
>
>
> Nathalie HOUSSIN, PhD
> Ohio State University - College of Optometry
> Plageman's Lab
> Fry Hall room 341c
> 338 W 10th avenue
> Columbus, Ohio 43210
> Tel: 614-292-3346
>
> --
> ImageJ mailing list: https://urldefense.com/v3/__http://imagej.nih.gov/ij/list.html__;!!KGKeukY!i0Y3SdRYsUQMPPBC4Cy1r0WrFKnSBQJsxXSKjUmlwvhentZVYOcYQIxYgbG3ZGBB$<https://urldefense.com/v3/__http:/imagej.nih.gov/ij/list.html__;!!KGKeukY!i0Y3SdRYsUQMPPBC4Cy1r0WrFKnSBQJsxXSKjUmlwvhentZVYOcYQIxYgbG3ZGBB$>





--
Sent from: https://urldefense.com/v3/__http://imagej.1557.x6.nabble.com/__;!!KGKeukY!i0Y3SdRYsUQMPPBC4Cy1r0WrFKnSBQJsxXSKjUmlwvhentZVYOcYQIxYgeNmorcE$<https://urldefense.com/v3/__http:/imagej.1557.x6.nabble.com/__;!!KGKeukY!i0Y3SdRYsUQMPPBC4Cy1r0WrFKnSBQJsxXSKjUmlwvhentZVYOcYQIxYgeNmorcE$>

--
ImageJ mailing list: https://urldefense.com/v3/__http://imagej.nih.gov/ij/list.html__;!!KGKeukY!i0Y3SdRYsUQMPPBC4Cy1r0WrFKnSBQJsxXSKjUmlwvhentZVYOcYQIxYgbG3ZGBB$<https://urldefense.com/v3/__http:/imagej.nih.gov/ij/list.html__;!!KGKeukY!i0Y3SdRYsUQMPPBC4Cy1r0WrFKnSBQJsxXSKjUmlwvhentZVYOcYQIxYgbG3ZGBB$>


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