Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
| Rater | Score | Time |
|---|---|---|
| fengzi | +2 | 2007-04-24 05:38 |
@echo off
for /f "tokens=2 delims=)" %%i in (2.txt) do echo %%~ni>>23.txt
pauseOriginally posted by lililulula at 2007-4-23 14:48:
for /f "tokens=1,* delims=)" %%a in (1.txt) do set need=%%b Take all content after the first ")" in all content of 1.txt, and assign it to the variable need
for /f "tokens=1 delims=." %%c in ("%need%") do echo %%c>2.txt Take all content in the need variable up to "." and output it to 2.txt
pause
Originally posted by zh159 at 2007-4-23 10:51 AM:
%参数只能用a-z,A-Z
@echo off&setlocal ENABLEDELAYEDEXPANSION
for /f "tokens=1* delims=))" %%_ in (ok.txt) do (
set str=%%`
set str=!str:.jpg=!
>>new.txt echo\!str!
)
start new.txt