http://imagej.273.s1.nabble.com/Batch-splitting-of-stacks-and-saving-tp4578247p4622263.html
did you set an output directory in Process>Batch>Macro? This might explain why the original is saved.
As I understand it, the original file won't be saved if the'Output...' field in the dialog is empty.
> Hi Michael and Dave,
>
> Thanks for your input. I appreciate the help!
>
> I've almost got there by modifying Michael's macros (haven't had a proper
> look at yours yet Dave).
>
> What I'm getting at the moment is that when I run the macro as batch, I am
> also getting duplicates of the original file in the destination folder. Not
> a massive problem, but it would be great if I could sort that out once and
> for all.
>
> I think it's because the Batch box is already asking for an output folder
> and file type. Is there anyway to stop it saving the duplicated original
> file?
>
> Here's what I'm currently using:
>
> title=getTitle();
> if(endsWith(title, ".tif"))
> title=substring(title, 0, lengthOf(title)-4);
> dir="\\\\AIFNAS3\\AIFdatasets\\Dom James\\2012-03scan\\test batch split\\";
> titleD=title+"_DAPI.tif";
> setSlice(1);
> run("Duplicate...", "title=titleD");
> saveAs("Tiff", dir+titleD);
> close();
> setSlice(2);
> titleG=title+"_488.tif";
> run("Duplicate...", "title=titleG");
> saveAs("Tiff", dir+titleG);
> close();
> close();
>
> --
> View this message in context:
>
http://imagej.1557.n6.nabble.com/Batch-splitting-of-stacks-and-saving-tp4578247p4620695.html