Имя пользователя:
Пароль:
 

Показать сообщение отдельно

Аватара для sunnykey

Пользователь


Сообщения: 124
Благодарности: 47

Профиль | Отправить PM | Цитировать


Код: Выделить весь код
@echo off
echo Clear %tmp%
for /f "delims=;" %%a in ('dir "%tmp%" /a:d /b') do rd "%tmp%\%%a" /s /q
for /f "delims=;" %%a in ('dir "%tmp%" /a:dh /b') do rd "%tmp%\%%a" /s /q
for /f "delims=;" %%a in ('dir "%tmp%" /a:ds /b') do rd "%tmp%\%%a" /s /q
for /f "delims=;" %%a in ('dir "%tmp%" /b') do del "%tmp%\%%a" /f /s /q
for /f "delims=;" %%a in ('dir "%tmp%" /a:s /b') do del "%tmp%\%%a" /f /s /q
for /f "delims=;" %%a in ('dir "%tmp%" /a:h /b') do del "%tmp%\%%a" /f /s /q
if exist "%LOCALAPPDATA%\Microsoft\Windows\INetCache\" (
	set tif="%LOCALAPPDATA%\Microsoft\Windows\INetCache\"
	goto :clearTIF
)
if exist "%USERPROFILE%\Local Settings\Temporary Internet Files\" (
	set tif="%USERPROFILE%\Local Settings\Temporary Internet Files\"
) else (
	set tif="%LOCALAPPDATA%\Microsoft\Windows\Temporary Internet Files\"
)	
:clearTIF
echo Clear %tif%
for /f "delims=;" %%a in ('dir "%tif%" /a:d /b') do rd "%tif%\%%a" /s /q
for /f "delims=;" %%a in ('dir "%tif%" /a:dh /b') do rd "%tif%\%%a" /s /q
for /f "delims=;" %%a in ('dir "%tif%" /a:ds /b') do rd "%tif%\%%a" /s /q
for /f "delims=;" %%a in ('dir "%tif%" /a:s /b') do del "%tif%\%%a" /f /s /q
for /f "delims=;" %%a in ('dir "%tif%" /a:h /b') do del "%tif%\%%a" /f /s /q
for /f "delims=;" %%a in ('dir "%tif%" /b') do del "%tif%\%%a" /f /s /q
Dism.exe /Online /Cleanup-Image /StartComponentCleanup
Для автоматизации работы программы для "Очистки диска" советую почитать статьи
Очистка диска в Windows 7: расширенная настройка и запуск по расписанию, Automating Disk Cleanup Tool in Windows и How to Automate the Disk Cleanup Tool in Windows XP and Windows 7

-------
cmd умри, powershell живи=)
Powershel 4.0 microsoft.com/ru-ru/download/details.aspx?id=40855

Это сообщение посчитали полезным следующие участники:

Отправлено: 10:51, 10-11-2014 | #2