title: Works in Command Prompt but not in BAT-file or CMD-file
body: <p>Due to problem with WINDOWS DEFENDER I need do the following:</p>
  
  <pre><code>for /r "%appdata%\..\Local\MyProg\2.0" %D IN ("*MyProgram.exe") DO "%~fD
  </code></pre>
  
  <p>It works perfect in COMMAND PROMPT but not in batch-file or cmd-file - why?</p>
  
  <p>How do I make in a excutable file as a Batch-file or ".cmd"?</p>