Тёмный

Deleting Temporary Files with a Batch File and Running it Silently with Windows Scheduler 

Outdated phrases
Подписаться 13
Просмотров 54
50% 1

how to delete temporary files, %temp% files, prefect files, recent files, and clean the Recycle Bin using a batch file. We'll also set up a task in Windows Scheduler to run this batch file every hour silently, without any pop-ups.
Below are require code to do the task,
Batch File code
@echo off
echo Deleting temporary files...
del /s /q %temp%\*
del /s /q C:\Windows\Temp\*
echo Deleting prefetch files...
del /s /q C:\Windows\Prefetch\*
echo Deleting recent files...
del /s /q %userprofile%\Recent\*
echo Cleaning Recycle Bin...
PowerShell -NoProfile -Command Clear-RecycleBin -Confirm:$false
echo Done!
VBS Script code
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "C:\path\to\temp_clean.bat" & Chr(34), 0
Set WshShell = Nothing
Make sure to replace C:\path\to\temp_clean.bat with the actual path to your batch file."

Опубликовано:

 

29 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии    
Далее
100+ Linux Things you Need to Know
12:23
Просмотров 657 тыс.
How cookies can track you (Simply Explained)
6:51
Просмотров 302 тыс.
I Recorded My IT Help Desk Phone Interview
10:30
Просмотров 282 тыс.
HOW TO FIX SLOW STARTUP IN WINDOW 10/11
8:59
My DREAM Everyday Tech!
18:07
Просмотров 3,6 млн
I switched to Linux 30 days ago... How did it go?
28:46
Manage Your Dotfiles with Home Manager!
32:06
Просмотров 47 тыс.