![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-29 08:04 |
47,816 topics / 349,916 posts / today 0 new / 48,265 members |
| DOS批处理 & 脚本技术(批处理室) » How to get the characters before the double quotation mark |
| Printable Version 2,108 / 4 |
| Floor1 roby | Posted 2006-12-22 11:50 |
| 新手上路 Posts 4 Credits 12 | |
|
I have a text
The content is as follows var URL = "adsdt.phpuser=sdfsd1&time=1166712303"; The numbers in it are changing I now want to take out this number for /f "tokens=4 delims==" %%i in (z1.txt) do echo %%i > z2.txt This can only take out 1166712303"; I don't know how to only take out the number Ask all the experts Thank you [ Last edited by namejm on 2006-12-21 at 10:58 PM ] |
|
| Floor2 namejm | Posted 2006-12-22 11:58 |
| 荣誉版主 Posts 1,737 Credits 5,226 From 成都 | |
|
```
@echo off for /f "tokens=4 delims==" %%i in (test.txt) do set str=%%i echo %str:~0,-2% pause ``` |
|
| Floor3 roby | Posted 2006-12-22 11:59 |
| 新手上路 Posts 4 Credits 12 | |
|
Thanks thanks
I know very little about batch processing I need to study and learn the code from the friend above :) Friend, can you explain Or please give me relevant tutorials to learn, thanks [ Last edited by roby on 2006-12-21 at 11:01 PM ] |
|
| Floor4 namejm | Posted 2006-12-22 12:16 |
| 荣誉版主 Posts 1,737 Credits 5,226 From 成都 | |
|
Please refer to post 10F of this thread: http://www.cn-dos.net/forum/viewthread.php?tid=24485&sid=ful3YN
|
|
| Floor5 roby | Posted 2006-12-22 12:21 |
| 新手上路 Posts 4 Credits 12 | |
|
Thank you, moderator.
Learned. :) |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |