How to create a script that creates text files in every folder in a directory? (Windows Batch)
<p>So basically, let's say I have the following folders in a directory:  </p>

<p>test_folder_1</p>

<p>test_folder_2  </p>

<p>And I also have a text file with the list of all the folders in that directory.</p>

<p>How can I create a script that will create a text file, test.txt, in all the folders in the directory? (test_folder_1 and test_folder_2)?  </p>

<p>I tried modifying some code I found online and got this:</p>

<pre><code>for /F "tokens=1 delims=," %%v IN (folderlist.txt) DO echo test&gt;"C:\Users\myname\My Documents\test\"%%v""  
</code></pre>

<p>However, running this, I get "Access Denied."<br>
Any idea what went wrong, or alternative ways to do this? Thanks.  </p>