title: How to loop over files in directory and change path and add suffix to filename
body: <p>I need to write a script that starts my program with different arguments, but I'm new to Bash. I start my program with:</p>
  
  <p><code>./MyProgram.exe Data/data1.txt [Logs/data1_Log.txt]</code>.</p>
  
  <p>Here is the pseudocode for what I want to do:</p>
  
  <pre><code>for each filename in /Data do
    for int i = 0, i = 3, i++
      ./MyProgram.exe Data/filename.txt Logs/filename_Log{i}.txt
    end for
  end for
  </code></pre>
  
  <p>So I'm really puzzled how to create second argument from the first one, so it looks like dataABCD_Log1.txt and start my program. </p>