Computing.Net > Forums > Disk Operating System > How to remove same file types in sub-directories?

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

How to remove same file types in sub-directories?

Reply to Message Icon

Name: Chee Seng TOH
Date: October 30, 2000 at 22:51:29 Pacific
Comment:

I am trying to remove the same file types (eg. *.tmp) from directory which has multiple sub-directory. I had tried with deltree but to no avail, can anyone help???

Thanks!



Sponsored Link
Ads by Google

Response Number 1
Name: Laurence
Date: October 31, 2000 at 04:28:28 Pacific
Reply:

Try this:


:: del_tmps.bat
@ECHO off
ECHO @PROMPT DEL >%temp%.\tmplist1.bat
DIR/A-D/B/L/O/-P/S *.tmp >>%temp%.\tmplist1.bat
CTTY nul
%COMSPEC%/C%temp%.\tmplist1.bat >%temp%.\tmplist2.bat
FIND ":\" <%temp%.\tmplist2.bat>%temp%.\tmplist3.bat
CALL %temp%.\tmplist3.bat
CTTY con
DEL %temp%.\tmplist?.bat



Batfiles: The DOS batch file programming handbook


0

Response Number 2
Name: W0rm
Date: October 31, 2000 at 17:38:13 Pacific
Reply:

oh god!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: How to remove same file types in sub-directories?

How to open text and exe in dos? www.computing.net/answers/dos/how-to-open-text-and-exe-in-dos/9471.html

how to remove Bad sectors. www.computing.net/answers/dos/how-to-remove-bad-sectors/8697.html

How can I remove files in DOS ? www.computing.net/answers/dos/how-can-i-remove-files-in-dos-/10052.html