@echo off path=C:\MinGW\bin;C:\MinGW\msys\1.0\bin if "%1" neq "" ( echo "%~nx1" gcc.exe -static -O2 -s -o "%~dpn1.exe" "%1" strip.exe -s "%~dpn1.exe" ) pause