title: cannot open output file helloWorld.exe: Permission denied
body: <p>When I try to compile helloWorld.c with gcc (by MinGW) via notepad++'s run feature I get the error:</p>
  
  <pre><code>cannot open output file helloWorld.exe: Permission denied
  </code></pre>
  
  <p>The problem only occurs when I run the compiler via notepad++'s run feature, so I get no errors when I just compile it manually via cmd.</p>
  
  <p>As some others have answered on similar questions, I have tried looking in process explorer and helloWorld.exe is not running.</p>
  
  <p>.</p>
  
  <p>Additional details about how I run it in notepad++</p>
  
  <p>I use a batch script compile.bat</p>
  
  <pre><code>gcc -o %1 %2
  %1
  PAUSE
  </code></pre>
  
  <p>and run it in notepad++ with the command</p>
  
  <pre><code>"...\compile.bat" $(NAME_PART) $(FILE_NAME)
  </code></pre>
  
  <p>What could be causing this error? Help would be deeply appreciated.</p>
  
  <p>EDIT: Turns out it was a problem with notepad++ that it didn't display that it was working in it's own directory. Also what caused a problem when I had tried to put the directory in the batch file was that it couldn't handle scandinavian letters.</p>