-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFixDriveAndIcons.bat
More file actions
40 lines (33 loc) · 1.19 KB
/
Copy pathFixDriveAndIcons.bat
File metadata and controls
40 lines (33 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
@echo off
echo ==========================================
echo Restoring Desktop and Documents from Google Drive
echo and removing sync overlays (green check marks)
echo ==========================================
:: Kill Google Drive (stop syncing)
taskkill /f /im GoogleDriveFS.exe >nul 2>&1
:: Set source and destination paths
set "gdDir=%UserProfile%\Google Drive\My Drive"
set "desktopSrc=%gdDir%\Desktop"
set "docsSrc=%gdDir%\Documents"
set "desktopDest=%UserProfile%\Desktop"
set "docsDest=%UserProfile%\Documents"
echo Moving Desktop files back...
if exist "%desktopSrc%" (
xcopy "%desktopSrc%\*" "%desktopDest%\" /s /e /h /y
)
echo Moving Documents files back...
if exist "%docsSrc%" (
xcopy "%docsSrc%\*" "%docsDest%\" /s /e /h /y
)
echo.
echo ✅ Files moved successfully.
echo.
:: ====== Clear icon cache to remove overlays ======
echo Rebuilding Windows Icon Cache (removing overlays)...
taskkill /f /im explorer.exe >nul 2>&1
del /a /q "%userprofile%\AppData\Local\IconCache.db" >nul 2>&1
del /a /f /q %LocalAppData%\Microsoft\Windows\Explorer\iconcache_*.db >nul 2>&1
start explorer.exe
echo.
echo ✅ Done! Your files are restored and overlays removed.
echo =================================