Delete / Clean up temp files or directory automatically in Windows
Clean up temp directory automatically in Windows 10
- Create a new batch file with the following content:
@echo off del "%tmp%\*.*" /s /q /f FOR /d %%p IN ("%tmp%\*.*") DO rmdir "%%p" /s /q
This will remove the contents of the Temp directory in Windows 10.
e.g.: delete only .txt files then @echo off del “%tmp%\*.txt” /s /q /f FOR /d %%p IN (“%tmp%\*.*”) DO rmdir “%%p” /s /q
Ref.: Read more
Learn Batch Script
List of Shell Commands
Run dialog: Press Win + R shortcut keys together on the keyboard to open the Run dialog.
Open up Startup Folder: C:\Users\...\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup Windows Start > Run > shell:Startup Cache folder: Windows Start > Run > shell:cache Cache folder: Windows Start > Run > shell:RecycleBinFolder Remote Desktop Connection: Windows Start > Run > mstsc
Create a Powershell script:::
Right click on desktop anywhere,
New > Shortcut >
Type: powershell.exe -command clear-recyclebin –Force
Next
Name it and Finish
7 Ways to Open Recycle Bin in Windows 10
Windows Command Line empty recycle bin
Batch to delete file automatically (cmd)
Forfiles script to delete files older than 7 days – Command Line
What are the files and directories located in the ../cognos/temp IBM directory used for ?
Script to clear browsing history and cache for IE, Firefox and Chrome
Leave a reply
You must login or register to add a new comment .