Concatenating and splitting json files in a 1 level deep folder structure : <p>I'm working on a translation project the content of which is in a one level deep folder structure in JSON files.
Essentialy it looks like this</p>

<pre><code>\folder1
    file1.json
    file2.json
    ...
\folder2
    file3.json
    file4.json
    ...
</code></pre>

<p>I need some automated way to:</p>

<ul>
<li>Merge these into a single file, preferebly one that contains the original file name and folder as the first line of each file's content
e.g.:</li>
</ul>

<pre><code>    \folder1\file1.json
    &lt;file1 content&gt;

    \folder1\file2.json
    &lt;file2 content&gt;

    \folder2\file3.json
    &lt;file3 content&gt;

    \folder2\file4.json
    &lt;file4 content&gt;
</code></pre>

<ul>
<li>Split the merged file and re-create the original folder structure. </li>
</ul>

<p>I'm using Windows10.</p>
