//Saves all image files(*.nd2) in the folder (not recursively) as TIFF stacks. //created on 12/14/11 //================================================ requires("1.44c"); setBatchMode(true); dir = getDirectory("Choose a Directory"); getTimeacquisition(dir); setBatchMode(false); function getTimeacquisition(dir){ list=getFileList(dir); for (i=0; i<(list.length); i++){ print(list[i]); if (endsWith(list[i], ".nd2")) { title1 = "time"; title2 = "["+title1+"]"; f = title2; run("Text Window...", "name="+title2+" width=70 height=8"); run("Bio-Formats Macro Extensions"); id = dir+list[i]; Ext.setId(id); creationDate = ""; Ext.getImageCreationDate(creationDate); print(f,id + ";AcquisitionDate; " + creationDate); selectWindow("time"); Path=id+(".txt"); saveAs("Text", Path); run ("Close"); } } }