3

I accidentally deleted %USERPROFILE%\My Pictures a while back, and am wanting to restore it, but despite trying for the last hour, I'm no closer to doing so. I've moved all my pictures to a new folder called My Pictures and tried numerous methods online to make that the "official" folder, including giving it attributes via CMD and making sure it has a registry key pointing to it at HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders, via Regedit. Nothing so far has worked to restore the original My Pictures icon to the folder or enable the Location tab that all special folders have in their Properties.

So aside from what I've already tried, I'm wanting to know how I can either restore the old My Pictures folder or make the current one I have "official". Would really appreciate an answer. Thanks.

Hashim Aziz
  • 13,835

1 Answers1

4

Nothing so far has worked to restore the original My Pictures icon to the folder or enable the Location tab that all special folders have in their Properties.

So aside from what I've already tried, I'm wanting to know how I can either restore the old My Pictures folder or make the current one I have "official". Would really appreciate an answer.

TO GET THE DEFAULT ICON BACK ONLY

Right-click on the new My Pictures folder and select the Properties option. Go to the Customize tab, and then in the Folder Pictures section, select the Restore Default option, and press Apply and then OK. Now check the folder for the default icon, etc.

enter image description here


TO GET THE DEFAULT ICON AND LOCATION TAB BOTH BACK

Run the below batch script so just save the logic to a .CMD or a .BAT file on your Windows PC somewhere with the issue, double-click, let it complete, then check to confirm all is back to normal.

@echo on

taskkill /f /im explorer.exe

timeout /t 2 /nobreak >nul

if not exist "%UserProfile%\Pictures" mkdir "%UserProfile%\Pictures"

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "My Pictures" /t REG_SZ /d "C:\Users\%USERNAME%\Pictures" /f

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "My Pictures" /t REG_EXPAND_SZ /d %%USERPROFILE%%"\Pictures" /f

attrib +r -s -h "%USERPROFILE%\Pictures" /S /D

timeout /t 1 /nobreak >nul

start explorer.exe

GOTO EOF

SOURCE: Two Method Instructions