Computing.Net > Forums > Programming > Batch File Question - Newbie

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.

Batch File Question - Newbie

Reply to Message Icon

Name: nickh21
Date: June 28, 2007 at 09:45:26 Pacific
OS: Windows XP
CPU/Ram: n/a
Product: Dell
Comment:

Hello all! Quick newbie question!

I am stuck deleting files in certain temp directories daily, and would like to know how to create a batch file to do this.

Basically I need to delete a few "folder\files in folder".

I don't want to answer Y every time either. I've tried, tried, tried, and failed to make one from instructions off google.

Please help!
Thanks much!




Sponsored Link
Ads by Google

Response Number 1
Name: tonysathre
Date: June 28, 2007 at 14:48:35 Pacific
Reply:

@echo off
del /q c:\temp\*.* > nul

You can add more directories by adding the
del /q drive:\dir\*.* on another line.

"Computer security." — Oxymoron


0

Response Number 2
Name: nickh21
Date: June 29, 2007 at 05:10:02 Pacific
Reply:

What about the local settings temp?

Would it be del/q %tmp%\*.*?

Thanks!


0

Response Number 3
Name: tonysathre
Date: June 29, 2007 at 11:01:12 Pacific
Reply:

That would work as well. There are two of them actually: %temp% and %tmp%. They both point to the same directory.


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: Batch File Question - Newbie

A couple of batch file questions www.computing.net/answers/programming/a-couple-of-batch-file-questions/17648.html

Batch file question www.computing.net/answers/programming/batch-file-question/13990.html

DOS batch files question www.computing.net/answers/programming/dos-batch-files-question/12395.html