Computing.Net > Forums > Programming > Deleting all .txt .log, .tmp files

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.

Deleting all .txt .log, .tmp files

Reply to Message Icon

Name: subbadu
Date: May 19, 2008 at 12:25:49 Pacific
OS: xp
CPU/Ram: intel
Product: 2007
Comment:

Hi ,

I need to delete all the .txt ,.log and .tmp files from a folder...through .bat scripring..pls let me know how i can do this

Thanks,
Subbadu



Sponsored Link
Ads by Google

Response Number 1
Name: IVO
Date: May 19, 2008 at 12:56:47 Pacific
Reply:

@echo off
for %%j in (txt log tmp) do del "C:\folder\*.%%j"

You too got your homework done today! And tomorrow..?


0

Response Number 2
Name: Razor2.3
Date: May 22, 2008 at 14:00:51 Pacific
Reply:

Not to nitpick, but it can be done even easier.

@del "c:\folder\*.txt" "c:\folder\*.log" "c:\folder\*.tmp"


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 Programming Forum Home


Sponsored links

Ads by Google


Results for: Deleting all .txt .log, .tmp files

Batch File Help, 'delete all folder www.computing.net/answers/programming/batch-file-help-delete-all-folder/13383.html

Delete all but last 10 lines .txt www.computing.net/answers/programming/delete-all-but-last-10-lines-txt/17375.html

Need to move all .txt and .csv file www.computing.net/answers/programming/need-to-move-all-txt-and-csv-file/16507.html