change file extension in batch
<p>Simple question.
IMDU command do</p>
<pre><code>imdu /b file.imd file.raw
</code></pre>
<p>and convert the file.imd on file.raw</p>
<p>I have a lot of .imd so I need a batch. I have tried:</p>
<pre><code>for %%x in (*.imd) do imdu /b %%x %%~nx.raw
</code></pre>
<p>But it doesn't work and creates a file called %%.raw</p>
<p>I need a batch which will remove the extension imd and replace it with raw.
How can I do that?</p>