Computing.Net > Forums > Disk Operating System > Delet all *.tmp in my C: ... But How?

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.

Delet all *.tmp in my C: ... But How?

Reply to Message Icon

Name: Carlos
Date: November 29, 2001 at 08:20:51 Pacific
Comment:

I would like to include the command line in my autoexec.bat that would delete all the *.tmp files in my HD during each reboot... is there any way to do it easlily?

Thanx!




Sponsored Link
Ads by Google

Response Number 1
Name: chris
Date: November 29, 2001 at 08:29:28 Pacific
Reply:

Assuming you mean the *.tmp files in the c:\windows\temp directory include this line in your autoexec.bat

Del c:\windows\temp\*.*

which will give you a yes/no prompt. There is a way round this.

Perhaps it's easier to just delete the C:\windows\temp directory completely. Which can be done by putting this line in your autoexec.bat.

Deltree /y c:\windows\temp

which will not prompt you for a yes/no.

When Windows starts, the \windows\temp folder is automatically regenerated.


0

Response Number 2
Name: Laurence
Date: November 29, 2001 at 09:56:54 Pacific
Reply:

This will do the job... but,
as written, it only works on
the current and subdirectories.

So write another batch that changes
to the root of each partition and calls
sweepdel.bat. If you have only one partition,
just run it from the root.

http://home7.inet.tele.dk/batfiles/monthly/feb2001.htm


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: Delet all *.tmp in my C: ... But How?

deleting files of c: only www.computing.net/answers/dos/deleting-files-of-c-only/13422.html

deleting particular files in dos www.computing.net/answers/dos/deleting-particular-files-in-dos/14032.html

Ems and Xms memory allocation in my DOS C program www.computing.net/answers/dos/ems-and-xms-memory-allocation-in-my-dos-c-program/2513.html