Delete all folders except one
<p>I want to delete all files and folders in my <code>C:\temp</code> except one specific folder (<code>C:\temp\123</code>) which contains a lot of files and subfolders.</p>
<p>I tried with <code>pushd &quot;c:\temp\123&quot; &amp;&amp; rd /s /q &quot;c:\temp&quot;</code> but it deletes all subfolders and files in <code>c:\temp\123</code>.</p>
<p>Can any one please help on the above?</p>