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-08 00:34
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help] Need a way to delete specified files in all directories on a specified drive View 658 Replies 2
Original Poster Posted 2008-04-05 21:22 ·  中国 重庆 长寿区 电信
初级用户
Credits 27
Posts 11
Joined 2007-11-14 01:55
18-year member
UID 102609
Gender Male
Status Offline
I need something to delete specified files in all directories on a specified drive.

Please help me, thanks to everyone in advance.

I want a batch file that deletes 2 specified files in all directories and subdirectories on drive D.

I'm a newbie and don't know how to write it. Could you please help me write one?

Thanks to everyone in advance /!
Floor 2 Posted 2008-04-05 21:33 ·  中国 广东 广州 越秀区 电信
初级用户
Credits 38
Posts 10
Joined 2007-10-01 13:25
18-year member
UID 98696
Gender Male
From GZ
Status Offline
Delete all a.txt and b.txt on drive X:

cd /d x:\&del /s /f /q a.txt b.txt
沉浸于脚本的流浪客。
纳须弥于芥子,容世界之脚本...
Floor 3 Posted 2008-04-05 23:57 ·  中国 重庆 合川区 电信
初级用户
Credits 27
Posts 11
Joined 2007-11-14 01:55
18-year member
UID 102609
Gender Male
Status Offline
Thank you very much. I really understand too little about DOS, I need to study more!
But it can't delete these 2 files named wsock32.dll and wsock32.dlltmp.
I can delete them directly by hand. Why can't the batch file delete these 2 files!?!?
That's strange!

[ Last edited by lxxpsp2 on 2008-4-6 at 12:08 AM ]
Forum Jump: