|
On 9 May 2007, at 16:44, Justin McGrath wrote:
<snip>
> But File.delete tells me I can only delete certain files, which is in
> the definition of the macro so I should have expected that. However,
> I can't figure out a way to keep a backup, since File.rename won't
> overwrite the old file. How have others done this?
Hi Justin,
maybe an answer to part 2 of your question above: For File.delete it
is enough if the string "ImageJ" is somewhere in the path.
So you can also delete a file in, e.g.,
/home/justin/data/myImageJresults/sample003/
An alternative would be creating a new backup each time, e.g.,
while (File.rename(results_file,results_file+getTime()) == 0)
wait(1);
(the while loop just in case you create two backups within a
millisecond)
Michael
|