![]() |
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-04 04:39 |
48,038 topics / 350,123 posts / today 0 new / 48,251 members |
| DOS批处理 & 脚本技术(批处理室) » (Help) How to write a .bat file to implement file renaming batch processing |
| Printable Version 2,853 / 18 |
| Floor16 tommy725 | Posted 2007-04-02 22:50 |
| 初级用户 Posts 14 Credits 36 | |
|
It's my own unfamiliarity with grammar, there was an input error, the test was all successful, thank you everyone. But everyone can also post new methods for comparison if there are any.
Thank you [ Last edited by tommy725 on 2007-4-2 at 09:52 AM ] |
|
| Floor17 acme | Posted 2007-04-13 09:06 |
| 中级用户 Posts 98 Credits 238 From 陕西 | |
|
It seems there is no specified path. Can we specify a path? Otherwise, how do we know which paths the renaming will be applied to?
|
|
| Floor18 fanglor | Posted 2007-04-13 14:07 |
| 初级用户 Posts 30 Credits 68 | |
|
set str=!str: =-!
Can you explain what this sentence means? Thanks! |
|
| Floor19 bjsh | Posted 2007-04-13 21:25 |
| 银牌会员 Posts 621 Credits 2,000 | |
|
set str=%str: =-%
This is to replace spaces in the environment variable str with -. For example set p=14+58+96 set p=%p:+=-% Then after execution, %p% is 14-58-96 |
|
| Prev 1 2 |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |