title: Copy a file into a specific subfolder
body: <pre><code>&quot;Here I am&quot;-folder
    |
    |--- mainfolder 1
    |          |
    |          |--- subfolder 1
    |          |--- subfolder 2
    |
    |--- mainfolder 2
    |          |
    |          |--- subfolder 1
    |          |--- subfolder 2
  </code></pre>
  <p>I want to place a batch-file into the &quot;Here I am&quot;-folder and execute it from there. It should copy a file named <em>text.txt</em> into all the subfolder 2 only.</p>
  <p>Tried:</p>
  <pre><code>@echo off 
  Setlocal EnableDelayedExpansion 
  cls 
  set currentDirectory=%CD% 
  FOR /D %%g IN (&quot;*&quot;) DO ( 
     Pushd %CD%\%%g 
     FOR /D %%f IN (&quot;*\Feedback Attachment(s)&quot;) DO ( 
        copy &quot;%currentDirectory%\MarkSheet_Practical_4.xlsx&quot; &quot;%%~ff&quot; 
     ) 
     Popd 
  ) 
  pause
  </code></pre>