file.delete()

Posted by Lionel Flandin-2 on
URL: http://imagej.273.s1.nabble.com/file-delete-tp3700321.html

Hin everyone,

I would like to use the file.delete() macro, but could not get it to work.
Here is an example of the code :

        var todelete="/sim/spicy/IJ/save/1.txt";
        if (File.exists(todelete)) {
                File.delete(todelete);
                print ("found and deleted");}
        else {print ("not found");}

I get the following error : "File must be in imageJ home or temp
directory in line 3".

any idea ?

Thanks in advance,

Lionel