I'm posting a solution here that may be helpful to many:
1st - for the search engines: This is a fix or way to get the desktop.ini file to display all the folder.ico images instead of the normal yellow folder icon.
2nd - The Problem: Those using Windows 7 (including me) have run into an issue where they have huge amounts of folders with images in them. In my case, being a photographer with hundreds of thousands of images, it gets difficult to sort things out when I have 100 folders of just Grand Canyon shots. Having an image on the folder icon (like XP used to do) makes the folder easier to visually analyze.
Other problems I see on forums are that users have to take the long route of right clicking each folder > Properties > Customize > Change Icon > Browse > Find The Icon > Exit out. This take a long time when you have thousands of folders.
You'll need to download 4 programs, and create a VBS Script.
*Image resizer (
http://imageresizer.codeplex.com/releases/view/30247)
*Image to Icon Program (ToYcon) (Google it)
*Batch File Renamer (your choice)
*Attribute Editor (
http://www.petges.lu/download/)
*VBS Script (Below)
Once you have these in place... it goes pretty quick.
Solution:
1. You must run a visual basic script. Go to Notepad, copy and paste the below and name it
folder2JPG.vbs (or anything you want) Make sure you add the .VBS at the end and not .TXT
The script looks like this: (Below the arrows & above, don't copy and paste the arrows)
>>>>>>>>>>>>>>>>
Const SHCONTF_FOLDERS = &H20
Const SHCONTF_NONFOLDERS = &H40
dim oXpShell, oWshShell, oFso, oFolder
'Assign objects
Set oXpShell = CreateObject("Shell.Application")
Set oWshShell = CreateObject("WScript.Shell")
Set oFso = CreateObject("Scripting.FileSystemObject")
set oFolder = oXpShell.BrowseForFolder(0, "Choose a Folder", 0)
If oFolder Is Nothing Then WScript.Quit
SetPic oFolder
Msgbox "Done"
Sub SetPic(oFolder)
set oSubFolderItems = oFolder.Items
oSubFolderItems.Filter SHCONTF_NONFOLDERS, "*.jpg"
If oSubFolderItems.Count > 0 Then
PicPath = oSubFolderItems.Item(0).Path
On Error Resume Next
oFso.CopyFile PicPath, oFolder.Self.Path & "\folder.jpg", False
On Error Goto 0
End If
set oSubFolderItems = oFolder.Items
oSubFolderItems.Filter SHCONTF_FOLDERS, "*"
For each oSubFolder in oSubFolderItems
If oSubFolder.IsFolder Then
SetPic oSubFolder.GetFolder
End If
Next
End Sub
>>>>>>>>>>>>>>>>>>>>>>>>
2. Script selects a top level folder and adds an image called "folder.jpg" to every subfolder using the first image in the directory. This is a batch process, and can take minutes to execute if you have a lot of files. Upon visiting your folders, you'll now see a new image called "folder.jpg" in each folder.
3. Resize: Go to your master directory where all your subfolders reside and do a search for "folder.jpg". This will allow you to use the Windows 7 resize tweak tool. At the time of this entry, I found it here:
http://imageresizer.codeplex.com/releases/view/30247. Resize your images no smaller than 256 x 256, which allows for maximum resolution for the icon.
4. Because there is no easy way to make .jpgs into .ico's, you have to use a tool. The best tool is currently ToYcon. Google it. Simply drag the folder.jpg onto the box, and VIOLA! It's now created an icon called folder.ico.
If for some reason you decide to use a different image as the .ico, you'll need to batch rename your .ico's. I use a batch renamer to adjust all my .ico's in multiple folders all at once. It's very handy.
5. Desktop.ini - Before of after step 6
You'll need to create a desktop.ini file in notepad that looks like this:
[.ShellClassInfo]
IconResource=folder.ico,0
Save it as desktop.ini wherever you want. You'll be copying and pasting this same desktop.ini into each folder. Do so now, or later. Either way works. This is the part where you're saving time. Instead of right-clicking each folder, you now will select the folder from the pane on the left (if your view options are set correctly) and simply paste the desktop.ini into each folder respectively. The icons won't appear until you do step 6. If you do step 6 first, they will all appear at once.
6. Attribute Changer - Handy tool called Attribute Changer can be found here:
http://www.petges.lu/download/
Once this is installed, right click the folder you want to change the attributes to. Instead of selecting properties at the bottom, you'll now see a new right-click menu option called "Change Attributes". You'll want to select (right-click) the top level folder (with all your sub-folders in it) because you're changing everything at once.
Under the Attribute changer window, select Read only and System from the folder properties, and make sure everything else is unchecked. Select the "Recurse folders" option at the bottom and hit "Apply".
This sets all your folders to a "system" folder setting which you normally have to do from the CMD prompt. If you have your desktop.ini files in place, hit refresh and you'll see all your Folders turn into Icon images at 256px.
Conclusion:
The entire process takes a bit of time to download all the tools. But when everything is in place, a folder full of sub-folders (about 100) can be changed in about 3-5 minutes. Compared to right clicking, it took about 25-30 minutes... including the use of shortcut keys. So you can see the advantage of changing massive amounts of data this way.