How to use a wildcard for filenames in batch command For?
<p>This batch line works with full filenames:</p>

<pre><code>for /f "skip=3 delims=*" %%g in (cc_data_3-3-2016_15-37-19.xml  cc_data_3-28-2016_0-25-36.xml) do (echo %%g &gt;&gt;tempfile.txt)
</code></pre>

<p>This one doesn't when filenames are replaced by a wildcard:</p>

<pre><code>for /f "skip=3 delims=*" %%g in (*.xml) do (echo %%g &gt;&gt;tempfile.txt)
</code></pre>

<p>What's wrong and what should I do to make it work? I need the *.xml files. They are in the same folder as the batch file. </p>