diff --git a/src/BatchCommands.cpp b/src/BatchCommands.cpp index babf1db92..ab514abc7 100644 --- a/src/BatchCommands.cpp +++ b/src/BatchCommands.cpp @@ -537,7 +537,7 @@ wxString MacroCommands::BuildCleanFileName(const FilePath &fileName, //OnSelectAll(); pathName = FileNames::FindDefaultPath(FileNames::Operation::Export); ::AudacityMessageBox( - XO("Export recording to %s\n/%s/%s%s") + XO("Export recording to %s\n/%s/%s.%s") .Format(pathName, cleanedString, justName, extension), XO("Export recording"), wxOK | wxCENTRE); @@ -557,6 +557,7 @@ wxString MacroCommands::BuildCleanFileName(const FilePath &fileName, cleanedName += wxFileName::GetPathSeparator(); cleanedName += justName; + cleanedName += '.'; cleanedName += extension; return cleanedName; @@ -633,12 +634,12 @@ bool MacroCommands::ApplySpecialCommand( wxString filename; FileExtension extension; // required for correct message if (command == wxT("ExportWAV")) - extension = wxT(".wav"); + extension = wxT("wav"); else if (command == wxT("ExportOgg")) - extension = wxT(".ogg"); + extension = wxT("ogg"); else if (command == wxT("ExportFLAC")) - extension = wxT(".flac"); - else extension = wxT(".mp3"); + extension = wxT("flac"); + else extension = wxT("mp3"); if (mFileName.empty()) { filename = BuildCleanFileName(project->GetFileName(), extension); diff --git a/src/menus/FileMenus.cpp b/src/menus/FileMenus.cpp index 721565f01..0f92d884e 100644 --- a/src/menus/FileMenus.cpp +++ b/src/menus/FileMenus.cpp @@ -54,8 +54,7 @@ void DoExport( AudacityProject &project, const FileExtension & Format ) if (!bPromptingRequired) { // We're in batch mode, and we have an mFileName and Format. - wxString extension = "."; - extension += Format; + wxString extension = Format; extension.MakeLower(); filename = @@ -73,7 +72,7 @@ void DoExport( AudacityProject &project, const FileExtension & Format ) number.Printf("%03i", counter); // So now the name has a number in it too. filename = MacroCommands::BuildCleanFileName( - project.GetFileName(), number + extension); + project.GetFileName() + number, extension); bPromptingRequired = wxFileExists(filename); } // If we've run out of alternative names, we will fall back to prompting