@echo off :: disarm directory args1 for /F "delims=" %%f in ('dir /b /s %1') do ( :: skip folders if not exist "%%~f\" ( :: skip .disarmed extension if not ".disarmed" == "%%~xf" ( move "%%~f" "%%~f.disarmed" echo "%%~f" renamed to "%%~f.disarmed" ) ) ) @pause