Advertisement
Guest User

remove .txt without pair files

a guest
Jan 18th, 2023
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.30 KB | Fixit | 0 0
  1. @echo off&set delFiles=0&pushd "%CD%\anime512x"&setlocal EnableDelayedExpansion&for %%a in (*.txt) do (set count=0&for %%b in ("%%~na.*") do (set /a count+=1&echo !count! %%b))&if !count!==1 echo %%a Delete&set /a delFiles+=1&del /f /q "%%a"
  2. echo    %delFiles% Files deleted&popd&pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement