看看这个行不?- @echo off
- setlocal enabledelayedexpansion
- set "cd_=%cd%"
- :loop
- set "cd_=%cd_:*\=%"
- set "cd_tmp=%cd_:\=%"
- if not "%cd_tmp%"=="%cd_%" goto loop
- set "folder_name=%cd_%"
- set n=0
- set sign1=1
- for /r "%cd%\" %%i in (*.*) do (
- if not "%%~nxi" equ "%~nx0" (
- set /a n+=1
- set /a sign2=n%%30
- if !sign2! equ 1 (
- cd.>"!folder_name!_!sign1!.txt"
- echo ^<tr^>>>"!folder_name!_!sign1!.txt"
- )
- echo ^<td^>%%~ni^</td^>>>"!folder_name!_!sign1!.txt"
- set /a sign3=n%%3
- if !sign3! equ 0 (
- echo ^</tr^>>>"!folder_name!_!sign1!.txt"
- if not !sign2! equ 0 echo ^<tr^>>>"!folder_name!_!sign1!.txt"
- )
- set /a sign1=n/30+1
- )
- )
- if not !sign3! equ 0 echo ^</tr^>>>"!folder_name!_!sign1!.txt"
- echo 执行完毕!&pause>nul
复制代码
[ 本帖最后由 lhjoanna 于 2008-12-30 18:14 编辑 ] |