Bounty down to half a btc
this.dpath = app.activeDocument.path;
this.filename = app.activeDocument;
this.filenumber = 0;
var f = new File(this.dpath+"/"+ this.filename + "measurements" + this.filenumber + ".txt" );
app.measurementLog.exportMeasurements (f, MeasurementRange.ALLMEASUREMENTS);
It overwrites every time. How do I make filenumber a variable determined by the number of measurement logs in the current folder?