Notepad appends ".txt" to file names it looks for

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
Walter Dnes

Notepad appends ".txt" to file names it looks for

Post by Walter Dnes »

The program I'm using is 4NEC2, a freeware antenna-modelling program.
I'm running wine-0.9.61 on Gentoo Linux on a Dell with Intel Core Duo
cpu.

Let's say I'm working on a design that I call "fubar". 4NEC2 will
create files with names like "fubar.NEC" and "fubar.log". 4NEC uses
Notepad to open the files for viewing. For some reason, my system
always seems to try opening them as "fubar.NE.txt" and "fubar.lo.txt".
The last character of the extension is deleted, and ".txt" is appended.

When it tries to open files with these weird names, the result is a
"File not found" error. Is there any way I can set Notepad not to be so
"helpful"? As a second option, 4NEC2 allows to specify another text
editor. Is there an "Edit" equivalant for Wine, or can Wine launch
linux programs like vim or nano?

--
Walter Dnes <[email protected]>
jeffz
Level 5
Level 5
Posts: 345
Joined: Thu Mar 13, 2008 10:03 pm

Re: Notepad appends ".txt" to file names it looks

Post by jeffz »

Walter Dnes wrote:The program I'm using is 4NEC2, a freeware antenna-modelling program.
I'm running wine-0.9.61 on Gentoo Linux on a Dell with Intel Core Duo
cpu.

Let's say I'm working on a design that I call "fubar". 4NEC2 will
create files with names like "fubar.NEC" and "fubar.log". 4NEC uses
Notepad to open the files for viewing. For some reason, my system
always seems to try opening them as "fubar.NE.txt" and "fubar.lo.txt".
The last character of the extension is deleted, and ".txt" is appended.

When it tries to open files with these weird names, the result is a
"File not found" error. Is there any way I can set Notepad not to be so
"helpful"? As a second option, 4NEC2 allows to specify another text
editor. Is there an "Edit" equivalant for Wine, or can Wine launch
linux programs like vim or nano?

--
Walter Dnes <[email protected]>
Can you give a step by step guide of how to reproduce this? I've downloaded the program but I'm unsure of how to reproduce your problem.
austin987
Wine Developer
Wine Developer
Posts: 2383
Joined: Fri Feb 22, 2008 8:19 pm

Notepad appends ".txt" to file names it looks for

Post by austin987 »

On Thu, Sep 4, 2008 at 12:00 AM, Walter Dnes <[email protected]> wrote:
The program I'm using is 4NEC2, a freeware antenna-modelling program.
I'm running wine-0.9.61 on Gentoo Linux on a Dell with Intel Core Duo
cpu.

Let's say I'm working on a design that I call "fubar". 4NEC2 will
create files with names like "fubar.NEC" and "fubar.log". 4NEC uses
Notepad to open the files for viewing. For some reason, my system
always seems to try opening them as "fubar.NE.txt" and "fubar.lo.txt".
The last character of the extension is deleted, and ".txt" is appended.
$ touch foobar.log
$ notepad foobar.log # file save

works fine
When it tries to open files with these weird names, the result is a
"File not found" error. Is there any way I can set Notepad not to be so
"helpful"? As a second option, 4NEC2 allows to specify another text
editor. Is there an "Edit" equivalant for Wine, or can Wine launch
linux programs like vim or nano?
Try notepad++
Walter Dnes

Notepad appends ".txt" to file names it looks for

Post by Walter Dnes »

BTW, the 4NEC author's first language is not English, so plese go easy
on the grammer in the program. "Help ==> About" indicates version
5.7.3, Windows XP running on Intel Pentium.

On Thu, Sep 04, 2008 at 02:52:17AM -0500, jeffz wrote
Can you give a step by step guide of how to reproduce this?
I've downloaded the program but I'm unsure of how to reproduce
your problem.
1) Start 4NEC2. All of the following steps take place on the "Main"
menu

2) select... Settings ==> Notepad Edit

3) File ==> Open 4NEC2 in-/output- file
open any of the example files, e.g. Example1.NEC
(Note; this step used to cause me problems at first, now it doesn't;
weird)

4) Edit ==> Input (.nec) file

At this point, I get the error dialog...

File 'C:\4NEC2\MODELS\EXAMPLE1.NE.txt'
does not exist

Do you want to create a new file?

--
Walter Dnes <[email protected]>
Gert van den Berg

Notepad appends ".txt" to file names it looks for

Post by Gert van den Berg »

Forgot to reply to all and choose the right from address....

I filed a bug:
http://bugs.winehq.org/show_bug.cgi?id=15130

Someone should confirm it....


---------- Forwarded message ----------
From: Gert van den Berg
Date: Fri, Sep 5, 2008 at 5:37 AM
Subject: Re: [Wine] Notepad appends ".txt" to file names it looks for
To: Walter Dnes


On Thu, Sep 4, 2008 at 11:20 PM, Walter Dnes <[email protected]> wrote:
4) Edit ==> Input (.nec) file

At this point, I get the error dialog...

File 'C:\4NEC2\MODELS\EXAMPLE1.NE.txt'
does not exist

Do you want to create a new file?
It would seem that if opening a file that doen not exist notepad
appends .txt to the filename.

Testcase:
notepad test.log

File "test.log.txt" does not exist

Do you want to create it?

This means that it is not possible to use notepad to crate a new file
with an extention different than txt with parameters....

It might still be acceptable for notepad to try opening a .txt file IF
IT exists. It should not offer te create a file with a different
extension than specified...

Gert
Alexander Nicolaysen S...

Notepad appends ".txt" to file names it looks for

Post by Alexander Nicolaysen S... »

På Torsdag 04 september 2008 , 23:20:53 skrev Walter Dnes:
BTW, the 4NEC author's first language is not English, so plese go easy
on the grammer in the program. "Help ==> About" indicates version
5.7.3, Windows XP running on Intel Pentium.

On Thu, Sep 04, 2008 at 02:52:17AM -0500, jeffz wrote
Can you give a step by step guide of how to reproduce this?
I've downloaded the program but I'm unsure of how to reproduce
your problem.
1) Start 4NEC2. All of the following steps take place on the "Main"
menu

2) select... Settings ==> Notepad Edit

3) File ==> Open 4NEC2 in-/output- file
open any of the example files, e.g. Example1.NEC
(Note; this step used to cause me problems at first, now it doesn't;
weird)

4) Edit ==> Input (.nec) file

At this point, I get the error dialog...

File 'C:\4NEC2\MODELS\EXAMPLE1.NE.txt'
does not exist

Do you want to create a new file?
I have sent a patch to fix notepad's behaviour with regards to appending .txt
to filenames. But I was not able to reproduce the issue you described;
notepad opens the files just fine, without any errors. The issue seems to be
that notepad is given the filename C:\4NEC2\MODELS\EXAMPLE1.NE, while it
should be C:\4NEC2\MODELS\EXAMPLE1.NEC

I used Wine 1.1.3 and 4NEC2 5.7.3. Could you upgrade to Wine 1.1.3 or newer
and see if the problem persists?


Alexander N. Sørnes
Gert van den Berg

Notepad appends ".txt" to file names it looks for

Post by Gert van den Berg »

On Tue, Sep 9, 2008 at 10:43 PM, Alexander Nicolaysen Sørnes
<[email protected]> wrote:
I have sent a patch to fix notepad's behaviour with regards to appending .txt
to filenames. But I was not able to reproduce the issue you described;
notepad opens the files just fine, without any errors. The issue seems to be
that notepad is given the filename C:\4NEC2\MODELS\EXAMPLE1.NE, while it
should be C:\4NEC2\MODELS\EXAMPLE1.NEC

I used Wine 1.1.3 and 4NEC2 5.7.3. Could you upgrade to Wine 1.1.3 or newer
and see if the problem persists?
Is the patch included with Wine yet? (I might try wine-git sometime)
As of wine-1.1.4 it seems that notepad's behaviour is unchanged.

http://www.mohag.net/tm1.png (I close the window for fakefile.test.txt
that opened (that file exists))

(I would probably leave the screenshot there until Google forces met
to switch from Google pages to Google sites, if anyone is having
problems accessing this more than a few months after this post...)

Thank you very much for looking into the issue...
Locked