
| Quote: | |
|
| Quote: | |
|
| Quote: | |
|
CODE: [Copy to clipboard]:: Disp10.bat - A sample of display 10 characters of front of echo line
:: Will Sort - 14:57 2005-8-1
:: Note: 文中的字符包括中文和英文字符,并且一个中文字算一个字符而非两个
@echo off
if "%1"=="" cmd /v:on /c %0 cmdshell & goto :EOF
if exist test2.txt del test2.txt
for /f "tokens=*" %%a in (test1.txt) do (
set line=%%a
echo !line:~0,10!>> test2.txt
)
set line=
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |