China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-25 16:50
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » [Help] (About folders) View 1,204 Replies 10
Original Poster Posted 2003-03-04 00:00 ·  中国 北京 联通
初级用户
Credits 114
Posts 4
Joined 2003-03-04 00:00
23-year member
UID 1047
Gender Female
Status Offline
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!
随风飘飘天地任逍遥
 有所为有所不为
Floor 2 Posted 2003-03-04 00:00 ·  中国 广东 佛山 禅城区 电信
元老会员
★★★★
Credits 5,170
Posts 1,637
Joined 2002-10-16 00:00
23-year member
UID 8
Gender Male
From 广东佛山
Status Offline
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
我的网志
http://hzmys.blog.163.com/
我的网盘
firststep.qjwm.com
fsmys.ys168.com
ssmys.ys168.com
www.brsbox.com/fsmys
www.brsbox.com/ssmys
www.brsbox.com/ccdos
Floor 3 Posted 2003-03-05 00:00 ·  中国 北京 联通
初级用户
Credits 114
Posts 4
Joined 2003-03-04 00:00
23-year member
UID 1047
Gender Female
Status Offline
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.
随风飘飘天地任逍遥
 有所为有所不为
Floor 4 Posted 2003-03-06 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Actually, you can just take the DELTREE command from DOS and use it under Win2K.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 5 Posted 2003-03-06 00:00 ·  中国 浙江 宁波 联通
银牌会员
★★★
Credits 1,001
Posts 309
Joined 2002-11-19 00:00
23-year member
UID 283
Gender Male
Status Offline
You can use rmdir or rd in place of deltree
Floor 6 Posted 2003-03-06 00:00 ·  中国 北京 联通
初级用户
Credits 114
Posts 4
Joined 2003-03-04 00:00
23-year member
UID 1047
Gender Female
Status Offline
The following is a quote from Wengier posted on 2003-3-6 1:38:58:
Actually, you can just take the DELTREE command from DOS and use it under Win2K.

Sorry, I'm a newbie, so I don't understand. Could you be a bit more specific?
随风飘飘天地任逍遥
 有所为有所不为
Floor 7 Posted 2003-03-06 00:00 ·  中国 北京 联通
初级用户
Credits 114
Posts 4
Joined 2003-03-04 00:00
23-year member
UID 1047
Gender Female
Status Offline
The following is a quote from imp posted on 2003-3-6 9:57:15:
You can use rmdir or rd in place of deltree

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.
随风飘飘天地任逍遥
 有所为有所不为
Floor 8 Posted 2003-03-06 00:00 ·  中国 浙江 宁波 联通
银牌会员
★★★
Credits 1,001
Posts 309
Joined 2002-11-19 00:00
23-year member
UID 283
Gender Male
Status Offline
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
Floor 9 Posted 2003-03-07 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
But RD/RMDIR does not support wildcards, so it can't do it. Commands like DD, XRD, etc. can do it.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 10 Posted 2003-03-10 00:00 ·  中国 湖南 长沙 教育网
初级用户
Credits 52
Posts 1
Joined 2003-03-10 00:00
23-year member
UID 1084
Gender Male
Status Offline
How can I copy a folder? Under a pure DOS system, I mean a folder, not a file. Thanks.
Floor 11 Posted 2003-03-10 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Use the XCOPY command to copy folders.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Forum Jump: