북마크 로그인 암호 크롬 확장 프로그램 남기고 모두 삭제
@echo off
color 0f
title IE-인터넷 임시파일 삭제 및 OS 휴지통 삭제
mode con cols=200 lines=30
pushd %~dp0
:: 관리자 권한 실행
@echo 관리자권한 확인용 >%windir%\admin.confirm || @(
echo Set UAC = CreateObject^("Shell.Application"^) > "%tmp%\admin.vbs"
echo UAC.ShellExecute "%~0", "", "", "runas", 1 >> "%tmp%\admin.vbs"
"%tmp%\admin.vbs" & del "%tmp%\admin.vbs" & exit)
@del %windir%\admin.confirm
rmdir %Windir%\Temp\ / s / q
rmdir %USERPROFILE%\AppData\Local\Temp\ / s / q
rmdir /s /q "%Temp%"
DEL /A/S/F/Q "C:\Windows\Temp\*.*"
DEL /A/S/F/Q "%USERPROFILE%\AppData\Local\Temp\*.*"
DEL /A/S/F/Q "%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Recent\"
DEL /A/S/F/Q "%USERPROFILE%\AppData\Local\Packages\windows_ie_ac_001\AC\INetCache\"
DEL /A/S/F/Q "%USERPROFILE%\AppData\Local\Microsoft\Windows\Explorer\IconCacheToDelete\"
DEL /A/S/F/Q "%USERPROFILE%\AppData\Local\Microsoft\Windows\Explorer\ThumbCacheToDelete\"
DEL /A/S/F/Q "%Windir%\ServiceProfiles\NetworkService\AppData\Local\Microsoft\Windows\DeliveryOptimization\"
DEL /A/S/F/Q "%USERPROFILE%\AppData\Local\Microsoft\Internet Explorer\"
DEL /A/S/F/Q "%USERPROFILE%\AppData\Local\Microsoft\Windows\INetCache\"
DEL /A/S/F/Q "%USERPROFILE%\AppData\Local\Microsoft\Windows\WebCache\"
DEL /A/S/F/Q "%USERPROFILE%\AppData\Local\Microsoft\Windows\IEDownloadHistory\"
DEL /A/S/F/Q "%USERPROFILE%\AppData\LocalLow\Microsoft\CryptnetUrlCache\Content\"
DEL /A/S/F/Q "%USERPROFILE%\AppData\LocalLow\Microsoft\CryptnetUrlCache\MetaData\"
::: Edge Data 백업 및 파일삭제
taskkill /im MicrosoftEdgeUpdate.exe /f
taskkill /im msedge.exe /f
xcopy /hryif "%userprofile%\AppData\Local\Microsoft\Edge\User Data\" "%userprofile%\AppData\Local\Temp\User Data\"
xcopy /hryif "%userprofile%\AppData\Local\Microsoft\Edge\User Data\Default\" "%userprofile%\AppData\Local\Temp\User Data\Default\"
RD /S /Q "%userprofile%\AppData\Local\Microsoft\Edge\User Data\"
echo.&echo.&echo.
echo. 사용중인 Edge Data 백업 후 복사
choice /t 1 /d n >nul
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\First Run" "%userprofile%\AppData\Local\Microsoft\Edge\User Data\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\FirstLaunchAfterInstallation" "%userprofile%\AppData\Local\Microsoft\Edge\User Data\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Last Browser" "%userprofile%\AppData\Local\Microsoft\Edge\User Data\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Last Version" "%userprofile%\AppData\Local\Microsoft\Edge\User Data\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Local State" "%userprofile%\AppData\Local\Microsoft\Edge\User Data\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Default\Bookmarks" "%userprofile%\AppData\Local\Microsoft\Edge\User Data\Default\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Default\Favicons" "%userprofile%\AppData\Local\Microsoft\Edge\User Data\Default\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Default\Preferences" "%userprofile%\AppData\Local\Microsoft\Edge\User Data\Default\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Default\Secure Preferences" "%userprofile%\AppData\Local\Microsoft\Edge\User Data\Default\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Default\Edge Profile.ico" "%userprofile%\AppData\Local\Microsoft\Edge\User Data\Default\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Default\Cookies" "%userprofile%\AppData\Local\Microsoft\Edge\User Data\Default\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Default\Login Data" "%userprofile%\AppData\Local\Microsoft\Edge\User Data\Default\"
echo.&echo.&echo.
RD /S /Q "%userprofile%\AppData\Local\Temp\User Data\"
echo.&echo.&echo.
echo. Edge Data 임시폴더 삭제 완료
choice /t 1 /d n >nul
if not exist "%userprofile%\AppData\Local\Google\Chrome\User Data\" goto :end
::사용중인 Chrome Data 백업 및 파일삭제
taskkill /im Chrome.exe /f
xcopy /hryif "%userprofile%\AppData\Local\Google\Chrome\User Data\" "%userprofile%\AppData\Local\Temp\User Data\"
xcopy /shryif "%userprofile%\AppData\Local\Google\Chrome\User Data\Default" "%userprofile%\AppData\Local\Temp\User Data\Default"
RD /S /Q "%userprofile%\AppData\Local\Google\Chrome\User Data\"
echo.&echo.&echo.
echo. 사용중인 Chrome Data 백업 후 복사
choice /t 1 /d n >nul
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\First Run" "%userprofile%\AppData\Local\Google\Chrome\User Data\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\FirstLaunchAfterInstallation" "%userprofile%\AppData\Local\Google\Chrome\User Data\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Last Browser" "%userprofile%\AppData\Local\Google\Chrome\User Data\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Last Version" "%userprofile%\AppData\Local\Google\Chrome\User Data\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Local State" "%userprofile%\AppData\Local\Google\Chrome\User Data\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Default\Bookmarks" "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Default\Favicons" "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Default\Preferences" "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Default\Secure Preferences" "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Default\Google Profile.ico" "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Default\Login Data" "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\"
xcopy /shryif "%userprofile%\AppData\Local\Temp\User Data\Default" "%userprofile%\AppData\Local\Google\Chrome\User Data\Default"
xcopy /shryif "%userprofile%\AppData\Local\Temp\User Data\Default\Extensions" "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\Extensions"
xcopy /shryif "%userprofile%\AppData\Local\Temp\User Data\Default\Local Extension Settings" "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\Local Extension Settings"
xcopy /shryif "%userprofile%\AppData\Local\Temp\User Data\Default\Local Storage" "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\Local Storage"
echo.&echo.&echo.
RD /S /Q "%userprofile%\AppData\Local\Temp\User Data\"
echo.&echo.&echo.
echo. Chrome Data 임시폴더 삭제 완료
choice /t 1 /d n >nul
if not exist "%userprofile%\AppData\Local\Naver\Naver Whale\User Data\" goto :end
::: Whale Data 백업 및 파일삭제
taskkill /im Whale.exe /f
xcopy /hryif "%userprofile%\AppData\Local\Naver\Naver Whale\User Data\" "%userprofile%\AppData\Local\Temp\User Data\"
xcopy /hryif "%userprofile%\AppData\Local\Naver\Naver Whale\User Data\Default\" "%userprofile%\AppData\Local\Temp\User Data\Default\"
RD /S /Q "%userprofile%\AppData\Local\Naver\Naver Whale\User Data\"
echo.&echo.&echo.
echo. 사용중인 Whale Data 백업 후 복사
choice /t 1 /d n >nul
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\First Run" "%userprofile%\AppData\Local\Naver\Naver Whale\User Data\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\FirstLaunchAfterInstallation" "%userprofile%\AppData\Local\Naver\Naver Whale\User Data\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Last Browser" "%userprofile%\AppData\Local\Naver\Naver Whale\User Data\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Last Version" "%userprofile%\AppData\Local\Naver\Naver Whale\User Data\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Local State" "%userprofile%\AppData\Local\Naver\Naver Whale\User Data\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Default\Bookmarks" "%userprofile%\AppData\Local\Naver\Naver Whale\User Data\Default\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Default\Favicons" "%userprofile%\AppData\Local\Naver\Naver Whale\User Data\Default\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Default\Preferences" "%userprofile%\AppData\Local\Naver\Naver Whale\User Data\Default\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Default\Secure Preferences" "%userprofile%\AppData\Local\Naver\Naver Whale\User Data\Default\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Default\Google Profile.ico" "%userprofile%\AppData\Local\Naver\Naver Whale\User Data\Default\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Default\Login Data" "%userprofile%\AppData\Local\Naver\Naver Whale\User Data\Default\"
xcopy /hryif "%userprofile%\AppData\Local\Temp\User Data\Default\Web Data" "%userprofile%\AppData\Local\Naver\Naver Whale\User Data\Default\"
echo.&echo.&echo.
RD /S /Q "%userprofile%\AppData\Local\Temp\User Data\"
echo.&echo.&echo.
echo. Whale Data 임시폴더 삭제 완료
choice /t 1 /d n >nul
:end
DEL /A/S/F/Q "%USERPROFILE%\AppData\Local\Packages\Microsoft.Windows.Search_cw5n1h2txyewy\LocalState\AppIconCache\"
DEL /A/S/F/Q "%Windir%\Prefetch\*.*"
DEL /A/S/F/Q "%Windir%\WinSxS\InstallTemp\*.*"
DEL /A/S/F/Q "%Windir%\WinSxS\Backup\*.*"
DEL /A/S/F/Q "%Windir%\Installer\$PatchCache$
DEL /A/S/F/Q "%Windir%\SoftwareDistribution\Download\*.*"
DEL /A/S/F/Q "C:\ProgramData\Microsoft\Windows Defender\Scans\History\Store\*.*"
DEL /A/S/F/Q "C:\ProgramData\Microsoft\Windows Defender\Scans\History\Service\*.*"
DEL /A/S/F/Q "C:\ProgramData\Microsoft\Windows Defender\Scans\History\Results\*.*"
DEL /A/S/F/Q "C:\ProgramData\Microsoft\Windows Defender\Scans\History\Results\ReportLatency\*.*"
DEL /A/S/F/Q "C:\ProgramData\Microsoft\Windows Defender\Scans\History\ReportLatency\Latency"
RMDIR /S /Q "C:\ProgramData\Microsoft\Windows Defender\Scans\History\ReportLatency\Latency"
RMDIR /S /Q "C:\ProgramData\Microsoft\Windows Defender\Scans\History\Service\DetectionHistory"
DEL /A/S/F/Q "C:\Windows\Logs\*.*"
del /s /f /q "%HOMEDRIVE%\$Recycle.Bin"
md %Windir%\Temp\
md %USERPROFILE%\AppData\Local\Temp\
exit
'유용한 배치파일' 카테고리의 다른 글
주요 사양 보기 (2) | 2023.11.15 |
---|---|
부팅 방식 및 C: 레이블 찾기 (0) | 2023.11.10 |
PE에서 Chrome을 링크로 가져오기 (0) | 2023.09.14 |
디스크 번호별 간단한 정보 (1) | 2023.04.06 |
DPI-설정 (0) | 2022.12.01 |