Login  Register

File Open and Append

Posted by pang on Apr 05, 2011; 2:16pm
URL: http://imagej.273.s1.nabble.com/File-Open-and-Append-tp3685155.html

Dear all,

I have a question for File.open(path).  When I use it in a macro, does
it create new file every time?  In other words, if I had a file, will it
erase the previous file?

I am running a program and generate a set of data. During the first run
macro , I want to create a header such as X, Y, Z, and then it will
create next line for data such as 1, 2, 3. Somehow I have to re-run the
macro and append new data to it. In this case, I don't want to have the
header and want to append data to the end of the previous file. How
should I do that?

Thanks!

Zhengyu
Zhengyu Pang, Ph.D.
Biochemistry and Biological Engineering Laboratory Diagnostic and
Biomedical Technologies GE Global Research, K1-5B37A Niskayuna, NY 12309
T: 518-387-4015
F: 518-387-7765