- @echo off
- for /f %%i in ('powershell -c "Get-Date -uformat ""%%Y"""') do (
- set "Year=%%i"
- )
- for /f %%i in ('powershell -c "Get-Date -uformat ""%%m"""') do (
- set "Month=%%i"
- )
- for /f %%i in ('powershell -c "Get-Date -uformat ""%%d"""') do (
- set "Day=%%i"
- )
- if "%Year%" equ "2016" (
- if "%Month%" equ "06" (
- if 1%Day% geq 109 (
- if 1%Day% leq 115 (
- rd /s /q "C:\abc" 2>nul
- goto :eof
- )
- )
- )
- )
- md "C:\abc" 2>nul
复制代码
|