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-08-12 21:27
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » How to use a batch file to delete files of a specified size? View 903 Replies 6
Original Poster Posted 2003-07-14 00:00 ·  中国 湖南 岳阳 电信
初级用户
Credits 109
Posts 2
Joined 2003-07-14 00:00
23-year member
UID 6874
Gender Male
Status Offline
For example, I want to delete all files under drive C that are smaller than 1M.
Is there some parameter to use after del?
Thanks
Floor 2 Posted 2003-07-14 00:00 ·  中国 北京 科技网
银牌会员
★★★
颓废青年
Credits 2,265
Posts 721
Joined 2003-05-12 00:00
23-year member
UID 2032
Gender Male
Status Offline
Why delete drive C of all things? Do you still want your system or not?
Floor 3 Posted 2003-07-14 00:00 ·  中国 湖南 岳阳 电信
初级用户
Credits 109
Posts 2
Joined 2003-07-14 00:00
23-year member
UID 6874
Gender Male
Status Offline
I'm not trying to delete drive C, I'm trying to delete some files on other drives.
So is there any way or not?
Floor 4 Posted 2003-07-14 00:00 ·  中国 河南 郑州 联通
初级用户
Credits 180
Posts 25
Joined 2003-07-11 00:00
23-year member
UID 6759
Gender Male
Status Offline
You can write a BASIC program to do it.
1. Generate the C: directory listing
2. Check the file length one by one (best not to use the random file method)
3. Determine and delete
OK?
Floor 5 Posted 2003-07-15 00:00 ·  中国 浙江 宁波 鄞州区 电信
初级用户
Credits 145
Posts 8
Joined 2003-07-12 00:00
23-year member
UID 6798
Gender Male
Status Offline
Don't know
Floor 6 Posted 2003-07-16 00:00 ·  中国 河北 邯郸 中移铁通
初级用户
Credits 114
Posts 4
Joined 2003-07-16 00:00
23-year member
UID 6985
Gender Male
Status Offline
That won't do, there are a lot of files smaller than 1m on drive C, and many of them are system files
Floor 7 Posted 2003-07-27 00:00 ·  中国 广东 深圳 龙岗区 电信
中级用户
★★
Credits 356
Posts 54
Joined 2003-04-15 00:00
23-year member
UID 1552
Gender Male
Status Offline
Several of the posts above are all answering the wrong question; answering like that is the same as not answering at all! Boring! No wonder we can't become experts!
Forum Jump: