回复 1# enoone1 - @echo off
- setlocal enabledelayedexpansion
- for /f "delims=" %%i in ('type test.txt^|findstr "\@"') do (
- set "str=%%i"
- for /l %%j in (0 1 256) do (
- if "!str:~%%j,1!"=="@" (
- set gk=1
- ) else (
- if "!str:~%%j,1!"=="," (
- if !gk! equ 1 (
- set gk=0
- echo,
- )
- )
- if "!str:~%%j,1!"==" " (
- if !gk! equ 1 (
- set gk=0
- echo,
- )
- )
- if "!str:~%%j,1!"=="" (
- if !gk! equ 1 (
- set gk=0
- echo,
- )
- )
- )
- if !gk! equ 1 (
- set /p =!str:~%%j,1!<nul
- )
- )
- )
- pause>nul
复制代码
|