![]() |
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-06 04:05 |
48,039 topics / 350,124 posts / today 2 new / 48,251 members |
| DOS批处理 & 脚本技术(批处理室) » [Solved] Problem with the for /f loop, I can never get the correct result |
| Printable Version 796 / 3 |
| Floor1 icyheart | Posted 2007-08-22 21:55 |
| 中级用户 Posts 81 Credits 216 | |
|
for /f "tokens=3 delims=- " %a in ('date /t') do @echo %a
pause date /t shows 2007-08-22 Wednesday But as soon as I run the code above, an error appears: No matter what, I can't get the final result. Where is the mistake? [ Last edited by icyheart on 2007-8-22 at 10:03 PM ] Attachments 1.jpg (17.45 KiB) |
|
| Floor2 slore | Posted 2007-08-22 21:59 |
| 铂金会员 Posts 2,478 Credits 5,212 | |
|
In a bat file it's %%a
|
|
| Floor3 icyheart | Posted 2007-08-22 22:02 |
| 中级用户 Posts 81 Credits 216 | |
|
Thanks, looks like I really got myself mixed up, I was getting dizzy reading it
|
|
| Floor4 yangjun1003 | Posted 2007-10-15 02:37 |
| 新手上路 Posts 2 Credits 2 | |
|
NXX I used to be dumb enough that I didn't dare look at it hahaha~~
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |