本帖最后由 qixiaobin0715 于 2021-12-3 08:40 编辑
- @echo off
- cd /d "D:\"
- sort /+500 A.txt>a.log
- set /p var=<a.log
- del a.log
- setlocal enabledelayedexpansion
- for /f "delims=*-" %%a in ("%var%") do (
- set str=%%a-
- if "!str:~9!"=="-" (
- start "" A.txt
- ) else if "!str:~10!"=="-" (
- start "" A.txt
- )
- )
复制代码 win10以上系统勿用 |