Command to delete temp files using cmd

Can anyone help me in removing temp files using cmd, i have used all these commands

rd /s /q %temp%
mkdir %temp%
rd /s /q c:\windows\temp\
mkdir c:\windows\temp\

Reuslts what i'm getting is " temp already exist"

1

2 Answers

Just leave c:\windows\temp intact and delete the files within. Do not remove the folder and recreate because there are busy files in there. Not all the files can be deleted.

So just delete what you can and leave the rest behind.

This is entirely normal for Windows.

0

This is the one I use, it will delete any file on the C: drive with .tmp file extension, never had any issues using it.

cd\
erase *.tmp /s
3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like