- @echo off & setlocal enabledelayedexpansion
- set prefix=00000000000000000000000000000000
- set targetSpace=10000000000
- set targetSpace=%prefix%%targetSpace%
- set targetSpace=%targetSpace:~-32%
- :step
- set/a num=60
- for /l %%a in (!num! -1 1) DO (
- echo 剩余时间: [%%a]
- timeout /t 1 /nobreak>nul & cls
- )
- set volume=
- for %%A in (D F G H I J I L K M N) do (
- for /f "tokens=*" %%B in ('wmic path win32_volume where "DriveLetter='%%A:'" get freespace /value^|find "="') do set %%B
- set freespace=%prefix%!freespace!
- set freespace=!freespace:~-32!
- if "!freespace!" gtr "!targetspace!" set "volume=%%A:\" & goto break
- )
- :break
- if defined volume move E:\*.txt !volume!
- goto step
复制代码
|