![]() |
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-15 13:40 |
47,813 topics / 349,903 posts / today 1 new / 48,257 members |
| DOS疑难解答 & 问题讨论 (解答室) » [Help] (About folders) |
| Printable Version 1,320 / 10 |
| Floor1 sky2003xo | Posted 2003-03-04 00:00 |
| 初级用户 Posts 4 Credits 114 | |
|
How can I use DOS commands or a batch file to delete a large number of empty folders named a1.tmp, a2.tmp, a3.tmp ... all at once? They were created by a piece of software, and there are a lot of them. Please!
|
|
| Floor2 MYS | Posted 2003-03-04 00:00 |
| 元老会员 Posts 1,637 Credits 5,170 From 广东佛山 | |
|
deltree -y a?.tmp
? can stand for any single character, to avoid accidentally deleting other folders. -y makes DELTREE delete the folder directly without asking. Of course, deltree -y *.tmp should probably work too |
|
| Floor3 sky2003xo | Posted 2003-03-05 00:00 |
| 初级用户 Posts 4 Credits 114 | |
|
Many thanks.
But deltree is an external command, and it can't be used under win2k! I want to write a batch file (so it doesn't matter if there are more commands) and run it under win2k. |
|
| Floor4 Wengier | Posted 2003-03-06 00:00 |
| 系统支持 Posts 10,521 Credits 27,736 | |
|
Actually, you can just take the DELTREE command from DOS and use it under Win2K.
|
|
| Floor5 imp | Posted 2003-03-06 00:00 |
| 银牌会员 Posts 309 Credits 1,001 | |
|
You can use rmdir or rd in place of deltree
|
|
| Floor6 sky2003xo | Posted 2003-03-06 00:00 |
| 初级用户 Posts 4 Credits 114 | |
The following is a quote from Wengier posted on 2003-3-6 1:38:58: Sorry, I'm a newbie, so I don't understand. Could you be a bit more specific? |
|
| Floor7 sky2003xo | Posted 2003-03-06 00:00 |
| 初级用户 Posts 4 Credits 114 | |
The following is a quote from imp posted on 2003-3-6 9:57:15: But rmdir or rd can't delete a whole bunch of them at once, especially a bunch of empty folders when you don't even know all their names. |
|
| Floor8 imp | Posted 2003-03-06 00:00 |
| 银牌会员 Posts 309 Credits 1,001 | |
|
Deletes a directory.
RMDIR path RD path /S In addition to the directory itself, also deletes all subdirectories and files under the specified directory. Used to delete a directory tree. /Q Quiet mode. When used with /S, deleting the directory tree no longer asks for confirmation |
|
| Floor9 Wengier | Posted 2003-03-07 00:00 |
| 系统支持 Posts 10,521 Credits 27,736 | |
|
But RD/RMDIR does not support wildcards, so it can't do it. Commands like DD, XRD, etc. can do it.
|
|
| Floor10 zkphw | Posted 2003-03-10 00:00 |
| 初级用户 Posts 1 Credits 52 | |
|
How can I copy a folder? Under a pure DOS system, I mean a folder, not a file. Thanks.
|
|
| Floor11 Wengier | Posted 2003-03-10 00:00 |
| 系统支持 Posts 10,521 Credits 27,736 | |
|
Use the XCOPY command to copy folders.
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |