![]() |
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-10 23:51 |
47,811 topics / 349,897 posts / today 0 new / 48,256 members |
| DOS批处理 & 脚本技术(批处理室) » How to move a folder with batch processing? |
| Printable Version 1,465 / 3 |
| Floor1 icekirin | Posted 2007-11-13 23:21 |
| 新手上路 Posts 1 Credits 4 | |
|
I am using the XP system.
Need to move a folder. There are subfolders and files under the folder. For example, there is a folder A under the C drive. There are folders 1, 2, 3, 4.... inside it, all with files. There are also files in the root directory of folder A. Need to move all the contents inside folder A to directory B on the D drive (it's the files and folders under A, not the entire folder A). The move command cannot be used to move folders. I thought about using xcopy and then deleting the directory, but encountered another problem. del can only delete files. rd can delete folders, but it also deletes folder A together (I need to keep folder A, but not the files and folders inside it). Do I make myself clear? Can anyone help? [ Last edited by icekirin on 2007-11-13 at 11:24 PM ] |
|
| Floor2 provem | Posted 2007-11-14 08:52 |
| 初级用户 Posts 82 Credits 92 | |
| Floor3 lxmxn | Posted 2007-11-14 14:15 |
| 版主 Posts 4,938 Credits 11,386 | |
|
After entering folder A, execute "rd /s/q .\".
|
|
| Floor4 ktv98 | Posted 2008-12-12 22:24 |
| 初级用户 Posts 81 Credits 112 | |
|
Really want to know. Batch processing seems there is no way to achieve. Best can directly cut (move) past. Don't use copy past. Then delete the original folder..
Difficult ah.... [ Last edited by ktv98 on 2008-12-12 at 22:27 ] |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |