1个回答
展开全部
@echo off
::设置待扫描的目录,扫描当前目录的话请设为小数点
set WorkDir=.
echo wscript.echo DateAdd("d",-1,"%date:~,7%/01")>getdata.vbs
for /f "delims=" %%a in ('cscript /nologo "getdata.vbs"') do set "ymd=%%~a"
del getdata.vbs
forfiles /p "%WorkDir%" /m *.txt /s /d -%ymd:~,10% /c "cmd /c echo @path"
pause
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询