CODE: [Copy to clipboard]@echo off set /p str=<"a.txt" set str=%str:111=% >"b.txt" echo.%str% move /y "b.txt" "a.txt"