本帖最后由 pcl_test 于 2015-2-28 13:36 编辑
回复 4# sdhaozao - @echo off
- setlocal enabledelayedexpansion
- for /f "usebackq delims=" %%a in ("D:\repetition.txt") do (
- for /r "D:\" %%b in (.) do (
- set "dir=%%b"
- if exist "!dir:~0,-1!%%a" (echo 删除文件"!dir:~0,-1!%%a" && del "!dir:~0,-1!%%a" /f /q)
- )
- )
- pause
复制代码
- @echo off
- cd /d "D:\"
- for /f "usebackq delims=" %%a in ("repetition.txt") do del "%%a" /f /q /s
- pause
复制代码
|