- @echo off
- cd /d "D:\XSS"
- set file="+Q5.1.txt"
- set per=50
- for %%a in (%file%) do set "dpn=%%~dpna" & set "x=%%~xa"
- set /a count=per-1, n=0
- setlocal enabledelayedexpansion
- for /f "usebackq delims=" %%a in (!file!) do (
- set /a count+=1, n=count/per
- echo %%a>>"D:\SS\!n!.+Q5.1!x!"
- )
- EXIT
复制代码 以上代码对1个指定文件进行分割处理,输出为序号+原文件名。请问如何修改,可对一个文件夹所有文件进行相同分割处理? |