本帖最后由 aloha20200628 于 2024-11-29 18:41 编辑
回复 1# 水煮水
以下代码存为 test.bat 运行,与 list.txt 同目录
可自定义代码第一行中的 pathA, pathB, n 三个变量值- @echo off & set "pathA=d:\a" &set "pathB=d:\b" &set "n=10"
- (for /L %%a in (1,1,%n%) do (
- set/p "F=" &setlocal enabledelayedexpansion
- if exist "%pathA%\!F!" move /y "%pathA%\!F!" "%pathB%\"
- endlocal))<list.txt
- echo,暂停10秒后自动继续...&timeout /t 10 >nul
- more +%n% list.txt|findstr /v "^$">"0.0"&move /y "0.0" list.txt
- pause&exit/b
复制代码
|