本帖最后由 pcl_test 于 2015-3-3 14:21 编辑
回复 1# syqh2010 - @echo off
- setlocal enabledelayedexpansion
- ::设置文件夹路径
- cd /d "D:\test\"
- for %%a in (*.txt) do (
- ::导出文件列表
- set "file=%%~dpnxa"
- set "file=!file:\=\\!"
- for /f "tokens=1* delims=." %%e in ('wmic datafile where name^="!file!" get LastModified ^|find "+"') do set "fdt=%%e"
- >temp.vbs echo,if !fdt! ^>= 20150301080000 then
- >>temp.vbs echo,WSH.Echo "true"
- >>temp.vbs echo,else
- >>temp.vbs echo,WSH.Echo "false"
- >>temp.vbs echo,end if
- for /f %%b in ('cscript /nologo temp.vbs') do set "t=%%b"
- del temp.vbs /f /q >nul
- if "!t!" equ "true" >>"%~dp0a.txt" echo,%%~a
-
- ::修改:LC值
- for /f "tokens=1* delims=:" %%b in ('findstr /n ":LC" "%%a"') do set n=%%b
- set m=1
- for /f "tokens=1* delims=:" %%c in ('findstr /n .* "%%a"') do (
- if !m! == !n! (
- >>$ echo,:LC ABC
- ) else (
- >>$ echo,%%d
- )
- set /a m+=1
- )
- move $ "%%a"
- )
- pause
复制代码
|