this is my first post and I hope, you can help me with this issue. I´m pretty new to using macros in ImageJ/Fiji, but tried some things out. My problem is the following:
I have multiple folders with different names (e.g. “318_1”, “318_2”), but each with 4 pictures in it with the same names (“CH1”, “CH2”, “CH3”, “CH4”). Now I want to duplicate and rename every picture so they have the name of the parent folder + their own name and save them to a new folder on my desktop. Because I have around 150 folders, I want to achieve this by using a macro. I know there are commands like File.getParent, but I just don´t understand how I have to use them.
What I tried until now (not really great, I know )
fileName = getTitle(); dir = File.getParent(fileName); run("Duplicate...", "dir + fileName"); run("16-bit"); saveAs("BMP", path);
Please help me!