dotfiles/bin/files-disarm.bat

14 lines
321 B
Batchfile

@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