
| Quote: | |
|
CODE: [Copy to clipboard]@echo off&setlocal EnableDelayedExpansion
set/a a=1
if exist new_file.txt del /a/q new_file.txt
for /f "delims=" %%a in (abc.txt) do (
call echo %%a!a!>>new_file.txt
set/a a+=1
)
| Quote: | |
|
CODE: [Copy to clipboard]for /f "tokens=1* delims=:" %%i in ('findstr /n .* file.txt') do echo %%j%%i >>new.txt
CODE: [Copy to clipboard][ Last edited by jmz573515 on 2006-12-26 at 09:53 AM ]on error resume next
set fso=createobject("scripting.filesystemobject")
set afile=fso.opentextfile(Wscript.Arguments(0),1)
do While afile.AtEndOfStream <> True
i=i+1
b=afile.readline
c= c & b &i& vbcrlf
loop
afile.close
set afile=fso.opentextfile(Wscript.Arguments(0),2)
afile.write c
afile.close
msgbox "已经给文件加上数字!",48+4096,"操作成功"
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |