http://imagej.273.s1.nabble.com/How-to-save-a-TFW-file-tp5014458p5014463.html
to one with suffix ".tfw" by using "File.rename( path1, path2 )".
> I am trying to save a TFW file (a text file with map coordinates) as
> generated by the XYZ2DEM plugin. This text file must have the same
> filename as the corresponding TIF, just TFW as extension instead. The
> problem is that ImageJ always saves text windows as TXT extension,
> except CSV is also allowed as the poster below requested earlier this
> year. Can ImageJ be modified to save TEXT files with any extension
> when this is given? It would make sense to be able to save text files
> with any extension of choice such as .LOG, .TFW, etc. as long as you
> know what you are doing.
>
> Here is my macro, which currently does not work in the latest version
> of ImageJ:
>
> FileXYZ = "E:\\3D Laser Scan\\Test Scan.xyz"; run("XYZ2DEM Importer",
> "open=&FileXYZ length=0.001 maximum=0.05 background=0.1 show
> generate"); selectWindow("Test Scan.tfw"); //select the TFW text
> window generated by XYZ2DEM saveAs("Text", "E:\\3D Laser Scan\\Test
> Scan.tfw"); //does not work, the file is saved as E:\\3D Laser
> Scan\\Test Scan.txt instead
>
> Stein Rørvik
>
> -----Original Message----- From: ImageJ Interest Group
> [mailto:
[hidden email]] On Behalf Of Rasband, Wayne (NIH/NIMH)
> [E] Sent: 17. april 2015 06:06 To:
[hidden email] Subject: Re:
> Saving Log window as a csv file but not a txt file
>
>> On Apr 16, 2015, at 8:38 AM, Tomm <
[hidden email]> wrote:
>>
>> Hi all,
>>
>> I want to save a text of Log window as a csv file. But the txt file
>> was saved. How can I change the extension from txt to csv? Here is
>> my macro code.
>
>> -- dir = getDirectory("Choose a Directory"); name = "test";
>> print("10"+","+"20"); saveAs("Text", dir +name + ".csv”);
>
> Upgrade to the latest ImageJ daily build (1.49r24) and this macro
> code will work as expected.
>
> -wayne
>
>> -- View this message in context:
>>
http://imagej.1557.x6.nabble.com/Saving-Log-window-as-a-csv-file-but-n>>
>>
>> at Nabble.com.