Display file extension.

File menu > Export
The Export dialogue is displayed.

Currently, there is a cursor in the “Name” field and the “Name” field is empty.

This proposal is that if a specific file format is selected, then the default extension for that file type should be in the Name field after the cursor.
The user can then type the file name and the full file name including the extension will be visible.
This will overcome the current issue that Audacity invisibly adds the default file extension if the name does not contain a dot, and does not add the default file extension if there is a dot.

More discussion on this issue here: https://forum.audacityteam.org/t/export-problem-if-file-name-contains-extra-dot/18910/1

I’m ok with that.

Other option would be to warn the user when saving a file with a different extension than the expected…

That’s what Audacity currently does, but gives rise to warnings if a file name that includes a dot is entered.

Currently:
Save as WAV produces these results (entered file name on the left - result on the right)
my-file => my-file.wav
my-file.wav => my-file.wav
my.file => Unexpected extension “file” (many Windows users get caught out by this warning)
my.file.wav => my.file.wav

With this proposal, the “.wav” would already be present, so typing “my.file” would put the file name before the extension “.wav” (which is already in the file-name text box) giving “file.name.wav” which would (obviously) work without warning.
If the user specifically wanted to use a non-standard file extension (for example they want to write an MP3 file with the extension “.mpeg”, then they can overwrite the default “.mp3”.

Even if you put the extension there, I bet some will still delete it :slight_smile:

Another option is not to let change the extension… always adding the extension regardless of having a dot in the file name or not…

It’s a tough call… Either option will have their own drawbacks… I’m not sure there will be a consensus on this one…

I’m fine with either option anyway :slight_smile:

Possibly so, but they’ve no grounds for complaint if they choose to do that.

Some Windows programs do that and I hate it. If I choose to use a non-standard file extension then I should be allowed to.

I think that the advantages of this proposal is that the behaviour will be less surprising for Windows users while not inflicting unnecessary restrictions on users with better operating systems. The one possible drawback that I can see is that WxWidgets may not support this feature on all platforms and I think that it’s better to have consistent cross-platform behaviour when possible.