![]() |
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-11 09:48 |
47,811 topics / 349,897 posts / today 0 new / 48,256 members |
| DOS批处理 & 脚本技术(批处理室) » [Solved] How to batch rename files? |
| Printable Version 1,073 / 5 |
| Floor1 dddyjq1 | Posted 2009-02-14 01:50 |
| 初级用户 Posts 108 Credits 175 | |
|
There are many MOV files in the same folder. How can I use A.TXT in that same folder to batch rename them? For example, change mysbdkr.mov to "The Eloquent Kong Rong.mov", change xdqyfx to "Xie Daoyun Cleverly Chanting Snow.mov". How should the code be written? Thanks in advance!
The contents of a.txt are: AFTXZ Afanti Bathing SZZG The Rope Grew Longer WYBGSQQ Wen Yanbo Fetches a Ball by Pouring Water SMGZGJR Sima Guang Smashes the Jar to Save the Child GZQS The Pot Passes Away LBKL Bitter Plums by the Roadside XWCQJYLW Xu Wenchang Cleverly Wins a Gift TJSM Tian Ji Horse Racing DCPA Scarecrow Solves the Case CCCX Cao Chong Weighs the Elephant CZQBCS Cao Zhi Composes a Poem in Seven Steps CNDLJ The Noisy Neighbor MLDJL The Donkey Becomes Manager ZMLQ Settling the Accounts MSY Selling Tree Shade TXDYW The Best Flavor Under Heaven SSZH Disaster Brought on by Sacrificing Oneself AFTZQML Afanti Cleverly Retrieves the Donkey The separator in the middle is not a space, it's a TAB [ Last edited by dddyjq1 on 2009-2-14 at 23:05 ] |
|
| Floor2 dddyjq1 | Posted 2009-02-14 21:51 |
| 初级用户 Posts 108 Credits 175 | |
|
Thank you, but the filenames didn't change
|
|
| Floor3 balinger | Posted 2009-02-14 22:11 |
| 中级用户 Posts 115 Credits 356 | |
| Floor4 yishanju | Posted 2009-02-14 22:14 |
| 银牌会员 Posts 1,357 Credits 1,488 | |
|
I already feel sick replying to this kind of repetitive thread. It's nothing more than a FOR and a REN, and you can't even modify it yourself?
This is really discouraging. |
|
| Floor5 dddyjq1 | Posted 2009-02-14 22:16 |
| 初级用户 Posts 108 Credits 175 | |
|
Exactly right, thanks, thanks
|
|
| Floor6 HAT | Posted 2009-02-14 22:26 |
| 版主 Posts 5,017 Credits 9,023 | |
|
If someone has helped you solve the problem, it is recommended that you do the following:
1. Edit the thread title and mark it with: 2. Give credits to the person who answered correctly as a way of showing thanks. Although everyone comes to the forum to learn rather than for credits, giving credits as a small token of appreciation can at least bring some comfort to the person who spent time and effort helping you selflessly. 3. If you wrote the code yourself based on someone else's hints, please post your own method and share it with everyone. Maybe others can point out deficiencies in your code, tell you how to improve execution efficiency, and so on. Only through discussion can you make faster progress. |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |