Feb 14
<code>
@echo off
echo.
echo….重复文件查找,等等待…
echo.written by hitme 2005.9.8
echo.
del tmp.txt 2>nul
for /f “delims=” %%i in (‘dir /s/b/aa %*                                                                       ‘) do (
echo.%%~ti  %%~nxi  %%~zi%%~dpi>>tmp.txt
)
(echo.^<html^>
echo.^<head^>
echo.^<meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″/^>
echo.^<style type=”text/css”^>
echo.^<!–
echo. a:active { text-decoration: none; color: red; fond: verdana; font-size: 10pt }
echo. a:visited { text-decoration: none; color: green; fond: verdana; font-size: 10pt }
echo. a:link { text-decoration: none; fond: verdana; font-size: 10pt }
echo. –^>
echo.^</style^>
echo.^</head^>
echo.^<body^>
echo.^<center^>
echo.^<b^>重复文件查找^</b^>^<br^>
echo.By hitme. 2005.9.8.^<p^>^</p^>
echo.^</center^>
echo.^<center^>
echo.^<table border=”1″ cellspacing=”0″^>
echo.^<tr^>^<th^>文件名^</th^>^<th^>路径^</th^>^</tr^>)>list.htm
setlocal ENABLEDELAYEDEXPANSION
for /f “tokens=1* delims=” %%i in (‘sort /t %temp% tmp.txt’) do (
if “!n!”==”%%i” (
echo.^<tr valign=”top”^>^<td align=”left”^>%%i^</td^>^<td align=”left”^>^<a href=”%%j” target=”_blank”^>%%j^</a^>^</td^>^<tr^>>>list.htm
if “!m!” neq “” (
echo.^<tr valign=”top”^>^<td align=”left”^>!n!^</td^>^<td align=”left”^>^<a href=”!m!” target=”_blank”^>!m!^</a^>^</td^>^<tr^>>>list.htm)
set m=) else (
set n=%%i
set m=%%j)
)
endlocal
(echo.^</table^>
echo.^</center^>^</body^>
echo.^</html^>)>>list.htm
del tmp.txt
start list.htm
</code>

<code>@echo off
echo.echo….重复文件查找,等等待…echo.written by hitme 2005.9.8echo.
del tmp.txt 2>nulfor /f “delims=” %%i in (‘dir /s/b/aa %*                                                                       ‘) do ( echo.%%~ti  %%~nxi  %%~zi%%~dpi>>tmp.txt)
(echo.^<html^> echo.^<head^> echo.^<meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″/^> echo.^<style type=”text/css”^> echo.^<!– echo. a:active { text-decoration: none; color: red; fond: verdana; font-size: 10pt } echo. a:visited { text-decoration: none; color: green; fond: verdana; font-size: 10pt } echo. a:link { text-decoration: none; fond: verdana; font-size: 10pt } echo. –^> echo.^</style^> echo.^</head^> echo.^<body^> echo.^<center^> echo.^<b^>重复文件查找^</b^>^<br^> echo.By hitme. 2005.9.8.^<p^>^</p^> echo.^</center^> echo.^<center^> echo.^<table border=”1″ cellspacing=”0″^> echo.^<tr^>^<th^>文件名^</th^>^<th^>路径^</th^>^</tr^>)>list.htm
setlocal ENABLEDELAYEDEXPANSIONfor /f “tokens=1* delims=” %%i in (‘sort /t %temp% tmp.txt’) do ( if “!n!”==”%%i” ( echo.^<tr valign=”top”^>^<td align=”left”^>%%i^</td^>^<td align=”left”^>^<a href=”%%j” target=”_blank”^>%%j^</a^>^</td^>^<tr^>>>list.htm if “!m!” neq “” ( echo.^<tr valign=”top”^>^<td align=”left”^>!n!^</td^>^<td align=”left”^>^<a href=”!m!” target=”_blank”^>!m!^</a^>^</td^>^<tr^>>>list.htm) set m=) else ( set n=%%i set m=%%j)
)
endlocal
(echo.^</table^> echo.^</center^>^</body^> echo.^</html^>)>>list.htmdel tmp.txtstart list.htm</code>

Leave a Reply