diff --git a/trimsp/src/TrimSPGUI/TrimSPGUI.ui.h b/trimsp/src/TrimSPGUI/TrimSPGUI.ui.h index 32556da..9143262 100644 --- a/trimsp/src/TrimSPGUI/TrimSPGUI.ui.h +++ b/trimsp/src/TrimSPGUI/TrimSPGUI.ui.h @@ -472,6 +472,17 @@ void TrimSPGUI::StartSequenceOne() } +# Create a subdirectory where all input/output files are saved + if (-d $All{"Path"}) { +# Directory exists, do nothing + } else { + $cmd="mkdir ".$All{"Path"}; + system($cmd); + } +# Change work directory accordingly + chdir ($All{"Path"}); + + # Cleanup from old files if (-e "ausgabe1.inp") { system("rm -f ausgabe*"); diff --git a/trimsp/src/TrimSPGUI4/TrimSPGUI4.pm b/trimsp/src/TrimSPGUI4/TrimSPGUI4.pm index 8f93810..8fa2599 100644 --- a/trimsp/src/TrimSPGUI4/TrimSPGUI4.pm +++ b/trimsp/src/TrimSPGUI4/TrimSPGUI4.pm @@ -493,7 +493,7 @@ sub StartSequenceOne my $cmd=""; my @called = caller; - print "pck=".$called[0]." fln=".$called[1]." line=".$called[2]; +# print "pck=".$called[0]." fln=".$called[1]." line=".$called[2]; if (!$ENV{'TRIMBIN'}) { # If trim.sp binary is not defined give warning and return my $Warning = Qt::MessageBox::information( this, "Warning!", @@ -502,6 +502,15 @@ sub StartSequenceOne } +# Create a subdirectory where all input/output files are saved + if (-d $All{"workPath"}) { +# Directory exists, do nothing + } else { + $cmd="mkdir ".$All{"workPath"}; + system($cmd); + } +# Change work directory accordingly + chdir ($All{"workPath"}); # Cleanup from old files if (-e "ausgabe1.inp") { @@ -612,7 +621,7 @@ sub StartSequenceOne } # Move the fort.33 file into the subdirectory and change its name - $cmd="rm -f eingabe1.inp; mv -f fort.33 ".$All{"workPath"}."/".$All{"fileNamePrefix"}."_Seq_Results.dat"; + $cmd="rm -f eingabe1.inp; mv -f fort.33 ".$All{"fileNamePrefix"}."_Seq_Results.dat"; system($cmd); $Progress=100; this->{ui}->progress->setValue($Progress);