Symptom

When you move the My Documents folder in Windows XP to a different drive/folder manually or using TweakUI PowerToys for Windows XP, the folder may be displayed with a generic icon.

Resolution

This happens if the IconIndex property is not specified in the desktop.ini file. Follow these steps to resolve the problem:

Click Start, Run and type the following command and press ENTER:

rundll32 mydocs.dll,PerUserInit

The above command-line (case-sensitive) recreates the desktop.ini file (in My Documents/My Music/My Pictures folders) with the default contents. For more information, see article My Pictures and My Music folders are displayed with the standard folder icon.

Then open My Documents folder and double-click the desktop.ini file (hidden file) to edit it using Notepad. Insert (append) the following data at the end of the file. Do not delete the existing contents in that file.

[.ShellClassInfo]
IconFile=%SystemRoot%\system32\mydocs.dll
IconIndex=0

Save the file and close Notepad.

Note: You need to configure Windows to show all files in order to view the desktop.ini file in Windows Explorer.

[Sample data] - Desktop.ini file contents from my system

[.ShellClassInfo]
IconFile=%SystemRoot%\system32\mydocs.dll
IconIndex=0
[DeleteOnCopy]
Owner=Ramesh
Personalized=5
PersonalizedName=My Documents