--- a/src/hugin1/stitch_project/hugin_stitch_project.cpp
+++ b/src/hugin1/stitch_project/hugin_stitch_project.cpp
@@ -69,6 +69,8 @@
 
     void OnQuit(wxCommandEvent& event);
     void OnAbout(wxCommandEvent& event);
+    /** sets, if existing output file should be automatic overwritten */
+    void SetOverwrite(bool doOverwrite);
 
 private:
 
@@ -209,6 +211,10 @@
     return true;
 }
 
+void RunStitchFrame::SetOverwrite(bool doOverwrite)
+{
+    m_stitchPanel->SetOverwrite(doOverwrite);
+};
 
 // **********************************************************************
 
@@ -316,6 +322,7 @@
         wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP },
       { wxCMD_LINE_OPTION, "o", "output",  "output prefix" },
       { wxCMD_LINE_SWITCH, "d", "delete",  "delete pto file after stitching" },
+      { wxCMD_LINE_SWITCH, "w", "overwrite", "overwrite existing files" },
       { wxCMD_LINE_PARAM,  NULL, NULL, "<project>",
         wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
       { wxCMD_LINE_NONE }
@@ -324,6 +331,7 @@
         wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP },
       { wxCMD_LINE_OPTION, wxT("o"), wxT("output"),  wxT("output prefix") },
       { wxCMD_LINE_SWITCH, wxT("d"), wxT("delete"),  wxT("delete pto file after stitching") },
+      { wxCMD_LINE_SWITCH, wxT("w"), wxT("overwrite"), wxT("overwrite existing files") },
       { wxCMD_LINE_PARAM,  NULL, NULL, wxT("<project>"),
         wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
       { wxCMD_LINE_NONE }
@@ -431,6 +439,7 @@
 
     wxFileName basename(scriptFile);
     frame->SetTitle(wxString::Format(_("%s - Stitching"), basename.GetName().c_str()));
+    frame->SetOverwrite(parser.Found(wxT("w")));
     bool n = frame->StitchProject(scriptFile, outname, progs, parser.Found(wxT("d")));
     return n;
 }