@echo off setlocal cd /d %~dp0 if "%~1" == "" ( echo Error: argument missing pause exit /b ) sed "s/^ ; Custom rules$/ #IncludeAgain %%A_ScriptDir%%\\\\drm.x/" "%~1" > drm.ahk