刚才写错了...bat还没搞明白...可能powershell好处理,但是我不会,只会简单调用,一直调用效率比较低
- @echo off
- cd /d "\\YSC-888888\AraxiVolume_YSC-888888_E\TIFF\"
- for /f "delims=" %%a in ('powershell "(Get-Date).AddMinutes(-3).ToString('yyyyMMddHHmmss')"') do (
- for /f "delims=" %%b in ('dir /b /a-d "*.TIF*"') do (
- for /f "delims=" %%c in ('powershell -Command "(Get-Item '%%b').CreationTime.ToString('yyyyMMddHHmmss')"') do (
- if "%%c" lss "%%a" (
- move /y "%%b" "\\Ctp-3(服务器)\d\one bit tif"
- )
- )
- )
- )
- pause
复制代码
|