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
  • 11,898
  • 35
  • 98
  • 166

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

Vomit IT - Chunky Mess Style
  • 40,038
  • 27
  • 84
  • 117
  • Nicely explained fix for what was a dozy mistake in the first place ;-) +1s to both, though - because it won't be the first or last time anyone does it. – Tetsujin Dec 12 '15 at 15:38
  • Thanks so much for this! It seems to have done the trick. One problem with the code, though - something seems to be preventing the last line from running, so I had to start Explorer manually. Other than that, works great. – Hashim Aziz Dec 12 '15 at 21:22