- @if(0)==(0) echo off&setlocal EnableDelayedExpansion
- for /f "delims=" %%j in ('dir /b/a-d/on "*.jpg" "*.png"') do (
- @for /f "delims=" %%k in ('echo %%~nj^|cscript -nologo -e:jscript "%~f0"') do (
- if "%%j" neq "%%k%%~xj" (
- set str=%%k&set year=!str:~6,4!&set day=!str:~12,2!
- set /a "y=^!(year%%4)&^!(^!(year%%100))|^!(year%%400)"
- set /a str=28+!y!&echo,身份证:%%k的信息为闰年!year!年出生,2月!str!天
- ) else (
- echo %%j :文件名不含中华人民共和国身份证号命名规则&echo.
- )
- )
- )
- pause & exit /b
- @end
-
- var objShell = new ActiveXObject('Shell.Application');
-
- while(!WScript.StdIn.AtEndOfStream) {
- var strFile = WScript.StdIn.ReadLine();
- var strFile = strFile.replace(/.*([1-9][0-9]{5}(19|20)[0-9]{2}(([0][13-9]|11|12)([0][1-9]|[12][0-9]|30)|([0][13578]|10|12)(31)|(02)([0][1-9]|1[0-9]|2[0-8]|29))[0-9]{3}[0-9X]).*/g, '$1');
- WSH.Echo(strFile);
- }
复制代码 气死了,我上午看见括弧不对称给删除,现在重写居然忘记了,,我也不怎么会弄JS, |