How to Delete Temporary Internet Files Command Line
How to Delete Temporary Internet Files Command Line or Command Prompt Easily. Generally, all temporary internet files located on the user account on Windows. If you wanna to delete all internet files, just following by command line.
How to Delete Temporary Internet Files on Windows 7 –
If you are a Windows 7 user, just follow some steps below –
We know normally internet temporary files are stored in the folder
AppData\Local\Temporary Internet Files. Now, you need to delete these files, so you need to take ownership of the folder and its files. Just run the command below –
takeown /R /F "%userprofile%\AppData\Local\Temporary Internet Files"
Need to take the ownership of this file for detailed information on this command.
Once you open the folder in Explorer and just delete the files. You need to run below command.
By this command to delete the files in the folder.
del "%userprofile%\AppData\Local\Temporary Internet Files\*"
By this command to delete the subfolders in
Temporary Internet Files.
forfiles /P "%userprofile%\AppData\Local\Temporary Internet Files\*" /C "cmd /c if @isdir==TRUE rmdir /S /Q @file"
If you delete the whole directory, you need to use just above two commands only. But keep the root folder and untouched it.
How to delete application temporary files –
For Windows 7, all various applications of temporary files keep in the located folder AppData\Local\Temp. If you want to delete this cache, just run the below command.
forfiles /P %userprofile%\AppData\Local\Temp\ /C "cmd /c if @isdir==TRUE rmdir /S /Q @file"
You can also verify to points this folder that the environment variables
c:\>set t TEMP=C:\Users\loginId\AppData\Local\Temp TMP=C:\Users\loginId\AppData\Local\Temp
So, deletion of temp files can also using by below command.
forfiles /P %TEMP%\* /C "cmd /c if @isdir==TRUE rmdir /S /Q @file"
Read Also: How to Reboot Windows from PowerShell