[c] How to compile and run C files from within Notepad++ using NppExec plugin?

I recommend my solution. My situation: g++(cygwin) on win10

My solution: Write a .bat batch file and execute compiler in that batch. compileCpp.bat

@echo off  
set PATH=%PATH%;C:\cygwin64\bin\
rm %~n1.exe
c++.exe -g %~dpnx1 -o %~dpn1.exe
%~n1.exe  

Console:

NPP_EXEC: "runCpp"
NPP_SAVE: E:\hw.cpp
CD: E:\
Current directory: E:\
cmd /c C:\cygwin64\bin\compileCpp.bat "hw.cpp"
Process started >>>
Hello World<<< Process finished. (Exit code 0)
================ READY ================