title: Recursive search for sql files in directories (NSIS)
body: <p>I have a problem with recursive search, but first some key data:</p>
  
  <ul>
  <li>I have several directories filled with sql files which I want to copy to $TEMP</li>
  <li>the directories i want to read from look like this v2.1.0.0</li>
  <li>at the moment, the directories v2.5.0.0 to v2.7.0.3 have to be read</li>
  <li>folders dont have to be "the next" so v2.5.0.3 can follow v2.5.0.0</li>
  <li>I'm using the LogicLib</li>
  <li>I'm new to this language (before java) and this is my first task</li>
  </ul>
  
  <p>I'm currently trying to solve the problem with a ${ForEach}</p>
  
  <pre><code>!macro GetSQLVersionFiles first second third fourth
  SetOutPath $TEMP
  ${ForEach} ${first} 0 9 + 1
      ${ForEach} ${second} 0 9 + 1
          ${ForEach} ${third} 0 9 + 1
              ${ForEach} ${fourth} 0 9 + 1
              IfFileExists "scripte\v${first}.${second}.${third}.${fourth}" 0 +2
              File "scripte\v${first}.${second}.${third}.${fourth}\*.sql"
              ${next}
          ${next}
      ${next}
  ${next}
  !macroend
  </code></pre>
  
  <p>so my idea was, to make it viable for later, to have a macro with 4 parameters in which one can put the start directory, say the desired "2 5 0 0" and it iterates through every folder and puts the found .sql files into the $TEMP directory</p>
  
  <p>things i've already tried</p>
  
  <ul>
  <li>refering to all parameters without the {}</li>
  <li>writing "${first} ${first} 9 + 1 (thought this would only iterate FROM first to 9)</li>
  </ul>
  
  <p>the error i get is following</p>
  
  <pre><code>!insertmacro: _ForEach
  Usage: StrCpy $(user_var: output) str [maxlen] [startoffset]
  Error in macro _ForEach on macroline 3
  Error in macro GetSQLVersionFiles on macroline 2
  Error in script "\\NAMEOFMYSCRIPT -- aborting creation process
  </code></pre>
  
  <p>the third line in _ForEach of the LogicLib is</p>
  
  <pre><code>StrCpy "${_v}" "${_f}"                                ; Assign the initial value
  </code></pre>
  
  <p>Thanks in advance for your help :)</p>