Friday, July 7, 2017

temporary files - Is there any software for cleaning Windows' temp folder?


Is there any software for cleaning Windows' local settings / temp folder?


With no installing, not many options, just a simple, nice interface with buttons to do what's needed and which wouldn't scare the younger users. Explicitly made for clearing the temp folder? Or maybe there is some command which can be run in Command Prompt (cmd.exe)?


It's just that Adobe Shockwave Player has some weird bug. It stores the files in this folder and now I and few other users are experiencing problems with files being used, not found and lot of mess generally which I guess is caused by the files being stored in this folder and not overwriting.


So it's kind of a hard situation here.. Disk Cleanup does not help in clearing this folder and CCleaner is very confusing for young users and people not into the OS.


Answer



You really don't need special software to do a straight delete of all files in any folder, this can be done with a simple batch file or from the command line:


del /s /q /f %temp%\*
del /s /q /f %windir%\temp\*

The first will get the current user temp folder, the other will get the system temp folder that some applications like to use.


EDIT: Per request, here is an explanation of the switches used, as found on MS Documentation:



/f : Forces deletion of read-only files.


/s : Deletes specified files from the current directory and all
subdirectories. Displays the names of the files as they are being
deleted.


/q : Specifies quiet mode. You are not prompted for delete
confirmation.



No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...